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

test-132.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ac9a986ce42b2234604ab71825f797bcbbee424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Reflection;

class T {
	protected internal string s;
	static int Main() {
		FieldInfo f = typeof(T).GetField ("s", BindingFlags.NonPublic|BindingFlags.Instance);
		if (f == null)
			return 2;
		FieldAttributes attrs = f.Attributes;
		if ((attrs & FieldAttributes.FieldAccessMask) != FieldAttributes.FamORAssem)
			return 1;
		return 0;
	}
}