-// Test for bug #60459
+// Compiler options: -warnaserror -warn:4
using System;
-using System.Reflection;
+using System.Runtime.InteropServices;
-public class EventTestClass {
- public event EventHandler Elapsed;
-}
+[StructLayout (LayoutKind.Sequential)]
+public class EventTestClass : IEventTest
+{
+ int i;
+ public event EventHandler Elapsed;
-public interface IEventTest {
- event EventHandler Elapsed;
+ public static void Main ()
+ {
+ }
}
-
-public class EntryPoint
+public interface IEventTest
{
- static bool test (Type type) { return type.GetEvent ("Elapsed").IsSpecialName; }
- public static int Main ()
- {
- return (test (typeof (EventTestClass))
- || test (typeof (IEventTest))) ? 1 : 0;
- }
+ event EventHandler Elapsed;
}