2005-06-05 Peter Bartok <pbartok@novell.com>
[mono.git] / mcs / errors / cs0079.cs
1 // cs0079.cs: Events can only appear on the left hand side of += or -=
2 // Line: 19
3  
4 using System;
5
6 class ErrorCS0079 {
7         public delegate void Handler ();
8         event Handler privateEvent;
9         public event Handler OnFoo {
10                 add {
11                         privateEvent += value;
12                 }
13                 remove {
14                         privateEvent -= value;
15                 }
16         }
17         void Callback() {
18                 if (privateEvent != null) 
19                         OnFoo();
20         }
21         
22         public static void Main () {
23         }
24 }
25
26