I have a backend class that has to raise an event with no arguments. The MethodInvoker has the desired signature but it feels a little odd to use it in a backend class since it is defined in System.Windows.Forms. Is there another delegate with this signature in other namespaces in the .Net Framework? If not, do you think that I should define a delegate with that signature myself or use MethodInvoker instead?
Share
If you are using .NET 2.0:
Define your own delegate type. Referencing an assembly only for such a simple type is not good idea in my opinion.
Many frameworks do so, too. Even in mscorlib (2.0) there might be some of them. However, they might be in deeper namespaces whose usage might be puzzling in combination with your class.
Therefore, use your own delegate type outside .NET 3.5.