In ilasm/tests:
[mcs.git] / errors / cs0072.cs
blob0e7c4619a6d5bbf7de6dfb2623931134135bd2e0
1 // cs0072.cs: Event `Child.OnFoo' can override only event
2 // Line: 16
4 using System;
6 class ErrorCS0072 {
7 public delegate void FooHandler ();
8 protected void OnFoo () {}
11 class Child : ErrorCS0072 {
12 // We are trying to override a method with an event.
13 protected override event FooHandler OnFoo {
14 add {
15 OnFoo += value;
17 remove {
18 OnFoo -= value;
22 public static void Main () {