Groups | Blog | Home
all groups > c# > may 2004 >

c# : Delegate parameters


Klaus H. Probst
5/4/2004 4:53:06 PM
Consistency? It's a sort of "unwritten" standard that will be helpful if you
are writing things other developers accustomed to the framework use.

--
Klaus H. Probst, MVP
http://www.vbbox.com/


[quoted text, click to view]

John Baro
5/4/2004 11:46:18 PM
It appears most of the delegates in VSNET have a sender parameter and an
eventargs parameter. Even if the eventargs parameter is empty.
What are the benefits of following this pattern when developing my own
delegates?
i.e
instead of
public void MyDelegate(string parameter);
we have
public void MyDelegate(object sender, MyInheritedEventargs parameter);
Cheers
JB

John Baro
5/5/2004 12:24:56 AM
Thats what I thought.
Makes it interesting when I have to subclass eventargs for almost every
event (will need to put some thought into reusability for multiple events).

Cheers
JB

[quoted text, click to view]

AddThis Social Bookmark Button