-// cs0079.cs: Events can only appear on the left hand side of += or -=
+// CS0079: The event `ErrorCS0079.OnFoo' can only appear on the left hand side of `+=' or `-=' operator
// Line: 19
using System;
class ErrorCS0079 {
- delegate void Handler ();
+ public delegate void Handler ();
event Handler privateEvent;
public event Handler OnFoo {
add {
}
public static void Main () {
- ErrorCS0079 error = new ErrorCS0077 ();
- error.OnFoo += new Handler (error.Callback);
- error.privateEvent ();
}
}