Is there any way that I can create a new delegate type based on an existing one? In my case, I\'d like to create a delegate MyMouseEventDelegate
which would have th
I you only want to achieve compile time type checking I guess it would be enough to create specialized EventArgs classes for the cases that you describe. That way you can still take advantage of the pre-defined delegates:
class RightMouseButtonEventArgs : MouseEventArgs {}
class LeftMouseButtonEventArgs : MouseEventArgs {}
EventHandler
EventHandler