1 using System
.Reflection
;
6 public static volatile string str
= "Hello";
11 public volatile int field
;
13 public static int Main ()
15 FieldInfo fi
= typeof (Test
).GetField ("field");
16 if (fi
.GetCustomAttributes (true).Length
!= 0)
19 Type
[] t
= fi
.GetRequiredCustomModifiers ();
23 if (t
[0] != typeof (System
.Runtime
.CompilerServices
.IsVolatile
))
26 fi
= typeof (GTest
<>).GetField ("str");
27 if (fi
.GetCustomAttributes (true).Length
!= 0)
30 t
= fi
.GetRequiredCustomModifiers ();
34 if (t
[0] != typeof (System
.Runtime
.CompilerServices
.IsVolatile
))
37 Console
.WriteLine ("OK");