Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-276.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a858dacd2f5f047e6f62eb3259f79819a34b95d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Compiler options: -warnaserror -warn:4

using System;
using System.Reflection;

public class EventTestClass : IEventTest {
        public event EventHandler Elapsed; // No warning is reported
}

public interface IEventTest {
        event EventHandler Elapsed;
}


public class EntryPoint
{
	public static bool test (Type type) { return type.GetEvent ("Elapsed").IsSpecialName; }	
        public static int Main ()
        {
                return (test (typeof (EventTestClass)) 
			|| test (typeof (IEventTest))) ? 1 : 0;
        }
}