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

cs0038-1.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3756fb89e438ee3b94d733cd947b43ccc82530ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// cs0038-1.cs: Cannot access a nonstatic member of outer type 'A' via nested type 'C.N'
class A {
	protected int n = 0;
}

class B : A { }

class C : B {
	class N {
		internal int foo () { return n; }
	}
	public static int Main () {
		N a = new N ();
		return a.foo ();
	}
}