1 // Compiler options: -o+
4 using System
.Reflection
;
8 public static D d1
= new D (1);
21 ConstructorInfo mi
= typeof(D
).GetConstructors (BindingFlags
.Instance
| BindingFlags
.Public
)[0];
22 MethodBody mb
= mi
.GetMethodBody();
24 Console
.WriteLine (mb
.GetILAsByteArray ().Length
);
25 if (mb
.GetILAsByteArray ().Length
!= 8) {
29 mi
= typeof (D
).GetConstructors (BindingFlags
.Static
| BindingFlags
.NonPublic
) [0];
30 mb
= mi
.GetMethodBody ();
32 Console
.WriteLine (mb
.GetILAsByteArray ().Length
);
33 if (mb
.GetILAsByteArray ().Length
!= 12) {
37 Console
.WriteLine ("OK");