Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / errors / cs0079.cs
1 // CS0079: The event `ErrorCS0079.OnFoo' can only appear on the left hand side of `+=' or `-=' operator
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