2 // This test probes that we treat events differently than fields
3 // This used to cause a compiler crash.
7 delegate void PersonArrivedHandler (object source
, PersonArrivedArgs args
);
9 class PersonArrivedArgs
/*: EventArgs*/ {
11 public PersonArrivedArgs (string name
) {
19 public Greeter (string greeting
) {
20 this.greeting
= greeting
;
23 public void HandlePersonArrived (object source
, PersonArrivedArgs args
) {
24 Console
.WriteLine(greeting
, args
.name
);
29 public event PersonArrivedHandler PersonArrived
;
32 // Assign a value to it, this also used to crash the compiler.
36 public void AddPerson (string name
) {
37 PersonArrived(this, null); //(this, PersonArrivedArgs(name));
42 public static int Main () {