Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0120-7.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a078be31c84cd97726f749c19035ae890713ce62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// CS0120: An object reference is required for the non-static field `String'
// Line: 11

using System;

public class MemRefMonoBug {
	private string String;	// this member has the same name as System.String class
	public static void Main ()
	{
		new MemRefMonoBug ().String = "";	// this line causes no problem
		String = "";	// mcs crashes in this line
	}
}