2 using System
.Reflection
;
3 using System
.Runtime
.CompilerServices
;
7 public delegate void DelType();
9 public event DelType MyEvent
;
11 public static int Main()
13 EventInfo ei
= typeof(Test
).GetEvent ("MyEvent");
14 MethodImplAttributes methodImplAttributes
= ei
.GetAddMethod ().GetMethodImplementationFlags();
16 if ((methodImplAttributes
& MethodImplAttributes
.Synchronized
) == 0) {
17 Console
.WriteLine ("FAILED");
21 methodImplAttributes
= ei
.GetRemoveMethod ().GetMethodImplementationFlags();
22 if ((methodImplAttributes
& MethodImplAttributes
.Synchronized
) == 0) {
23 Console
.WriteLine ("FAILED");