1 using System
.Reflection
;
6 public volatile int field
;
8 public static int Main ()
10 FieldInfo fi
= typeof (Test
).GetField ("field");
11 if (fi
.GetCustomAttributes (true).Length
!= 0)
14 Type
[] t
= fi
.GetRequiredCustomModifiers ();
18 if (t
[0] != typeof (System
.Runtime
.CompilerServices
.IsVolatile
))
21 Console
.WriteLine ("OK");