Name

MethodInvoker

Synopsis

This (extremely useful!) delegate encapsulates a void method with no parameters. This is one of the most common utility delegates, and it saves you from repeatedly having to define your own. As an example, you might use it in conjunction with Control.Invoke() to marshal an inter-thread call back onto the UI thread. I only wish I’d found it sooner . . . .


public delegate void MethodInvoker();

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.