Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0079.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 04900c92c1c94c24bce5bfbc3d4e44c618a43e95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// cs0079.cs: Events can only appear on the left hand side of += or -=
// Line: 19
 
using System;

class ErrorCS0079 {
	public delegate void Handler ();
	event Handler privateEvent;
	public event Handler OnFoo {
		add {
			privateEvent += value;
		}
		remove {
			privateEvent -= value;
		}
	}
	void Callback() {
		if (privateEvent != null) 
			OnFoo();
	}
	
	public static void Main () {
	}
}