Why it's not?
An "event handler" is just a method as any other, in the same way that you
can have the same method hooked to more than one controls you can call it
yourself,
At the very least, it makes for code that is difficult to read. The test of
a practice is to imagine what the result would be if it were repeated a
sufficient number of times. In addition, it has parameters which are
irrelvant to anything but the delegate it is assigned to. This also adds
confusion to the code. An event handler's purpose is to handle an event.
IMO that is the reason why the sender parameter is there in the first
place, so the method can have a reference to who called it.
No, the purpose of the sender parameter is to match the signature of the
delegate it is assigned to. It is a Microsoft convention to add a sender
parameter to an EventHandler delegate, and sometimes it is a necessity, bot
often it is not. The convention exists for more than one purpose.
A property name may be any token that satisfies the grammatical rules for a
property name. None of those rules specify anything about casing. Camel
Case, Hungarian Notation, lower case, it is not specified in the grammar.
But Microsoft has a set of conventions for naming fields and properties that
they apply strictly throughout the organization. Again, there is a purpose
for this. It makes code easier to read and debug.
The C family of languages specifies nothing about the number and type of
white space characters between statements. You can type a whole slew of them
on the same line if you wish, to say nothing of indentation. But Microsoft
and other companies have strict sets of rules regarding this. Again, why?
If you program long enough, and eat enough of your own (and other people's)
dog food, you will find out. Of course, you could always skip the
indigestion, and take my word for it.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.