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

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

using System;

namespace N
{
	class Program
	{
		public static void Main ()
		{
			Parent pr = new Child();
			((Child)pr).OnExample();
		}
	}

	public abstract class Parent
	{
		public delegate void ExampleHandler();
		public abstract event ExampleHandler Example;
	}

	public class Child : Parent
	{
		public override event ExampleHandler Example;
		public void OnExample()
		{
			if (Example != null) Example();
		}
	}
}