[Mono-list] add, remove vs get, set (was: Mono's Coding Standard)

Daniel Carrera dcarrera@math.toronto.edu
Thu, 25 Apr 2002 13:09:17 -0400 (EDT)


> Mhm, more like this (also properties:
>
> public int Property {
> 	get {
> 		throw Blah ();
> 	}
>
> 	set {
> 		throw Blah ();
> 	}
> }
>
> Ditto for events.

I just want to doublecheck something:

Events don't have 'get' and 'set' fields (I know they're not fields, but I
don't know what they are called).  Instead, they have 'add' and 'remove'.

Therefore, properties are stubbed as above, and events are stubbed as
below:

public event EventHandler SomeEvent {
        add {
		throw ...;
	}

        remove {
		throw ...;
	}
}


Is this correct?

Daniel.