ILASM atleast allows to compile. But an excepttion gets thrown when the event is actually invoked. Things would have been lot more simpler if delegates supported inheritance.
-----Original Message----- From: Marsh, Drew [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 1:43 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Dumb delegate question Rama Krishna [mailto:[EMAIL PROTECTED]] wrote: > None of the syntax I have tried works. The only thing I have to do is > to write three separate functions. Is there no better way? Unfortunately delegate signatures must match EXACTLY. Even though MouseEventArgs is a subclass of EventArgs it's not the exact same type, so it's not allowed. I'm not sure I understand the reasoning for this and wish it weren't the case. HTH, Drew .NET MVP You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.