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: f85a91b2e6a8baae5f5fb60dccef30e5d130580b (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
	{
		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();
		}
	}
}