N
news.microsoft.com
Hi,
Why was it decided to implement subscribing an observer to an event with
+= and -= operators and not providing some kind of .Add and .Remove methods?
Wouldnt this be nicer?
having it as something.EventHere += new BlahHandler(class.method):
instead of
something.EventHere.Add(class.method); for +=
and
something.EventHere.Remove(class.Method)
what other way are we going to add a callback method?
= ? then why not use singlecast delegates. we could always provide a
..clear() method
Just a thought
Why was it decided to implement subscribing an observer to an event with
+= and -= operators and not providing some kind of .Add and .Remove methods?
Wouldnt this be nicer?
having it as something.EventHere += new BlahHandler(class.method):
instead of
something.EventHere.Add(class.method); for +=
and
something.EventHere.Remove(class.Method)
what other way are we going to add a callback method?
= ? then why not use singlecast delegates. we could always provide a
..clear() method
Just a thought