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

test-498.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2615f61d83fe755579ca2c6dc8db079d3c39ab9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Reflection;
using System.Runtime.CompilerServices;

struct A
{
	[MethodImplAttribute(MethodImplOptions.InternalCall)]
	public extern A (float value);
	
	public extern int Foo {
		[MethodImplAttribute(MethodImplOptions.InternalCall)]
		get;
	}
}

struct C
{
	public static int Main ()
	{
		MethodImplAttributes iflags = typeof (A).GetConstructors()[0].GetMethodImplementationFlags ();
		if ((iflags & MethodImplAttributes.InternalCall) == 0)
			return 1;

		iflags = typeof (A).GetProperties ()[0].GetGetMethod ().GetMethodImplementationFlags ();
		if ((iflags & MethodImplAttributes.InternalCall) == 0)
			return 2;
		
		return 0;
	}
}