[sdks] Fix README.md
[mono-project.git] / mcs / tests / test-498.cs
blob2615f61d83fe755579ca2c6dc8db079d3c39ab9e
1 using System.Reflection;
2 using System.Runtime.CompilerServices;
4 struct A
6 [MethodImplAttribute(MethodImplOptions.InternalCall)]
7 public extern A (float value);
9 public extern int Foo {
10 [MethodImplAttribute(MethodImplOptions.InternalCall)]
11 get;
15 struct C
17 public static int Main ()
19 MethodImplAttributes iflags = typeof (A).GetConstructors()[0].GetMethodImplementationFlags ();
20 if ((iflags & MethodImplAttributes.InternalCall) == 0)
21 return 1;
23 iflags = typeof (A).GetProperties ()[0].GetGetMethod ().GetMethodImplementationFlags ();
24 if ((iflags & MethodImplAttributes.InternalCall) == 0)
25 return 2;
27 return 0;