2010-04-06 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0079.cs
blob577b0155412c3c02c7c62fed2019203e0c070c7d
1 // CS0079: The event `ErrorCS0079.OnFoo' can only appear on the left hand side of `+=' or `-=' operator
2 // Line: 19
4 using System;
6 class ErrorCS0079 {
7 public delegate void Handler ();
8 event Handler privateEvent;
9 public event Handler OnFoo {
10 add {
11 privateEvent += value;
13 remove {
14 privateEvent -= value;
17 void Callback() {
18 if (privateEvent != null)
19 OnFoo();
22 public static void Main () {