1 // This code must be compilable without any warning
2 // Compiler options: -warnaserror -warn:4 -unsafe
3 // Test of wrong warnings
6 using System
.ComponentModel
;
10 object disposedEvent
= new object ();
11 EventHandlerList Events
= new EventHandlerList();
13 public event EventHandler Disposed
15 add { Events.AddHandler (disposedEvent, value); }
16 remove { Events.RemoveHandler (disposedEvent, value); }
19 public void OnClick(EventArgs e
)
21 EventHandler clickEventDelegate
= (EventHandler
)Events
[disposedEvent
];
22 if (clickEventDelegate
!= null) {
23 clickEventDelegate(this, e
);
28 public interface EventInterface
{
29 event EventHandler Event
;
32 class Foo
: EventInterface
{
33 event EventHandler EventInterface
.Event
42 public static void my_from_fixed(out int val
)
47 public static void month_from_fixed(int date
)
50 my_from_fixed(out year
);
53 internal static int CreateFromString (int arg
)
64 public unsafe double* GetValue (double value)
70 public static void Main () {