I heard once that .net introduced an already defined delegate with no parameter that we could use instead of creating one.
I'm having a hard time finding it and for what version of .net. (if it really exists)
Thanks!
I heard once that .net introduced an already defined delegate with no parameter that we could use instead of creating one.
I'm having a hard time finding it and for what version of .net. (if it really exists)
Thanks!
Yes, it's called System.Action. If you are not using .NET Framework 3.5 (where Action was introduced), you can perhaps instead use System.Windows.Forms.MethodInvoker which has the same signature.