Export (0) Print
Expand All
Expand Minimize

MethodInvoker Delegate

Represents a delegate that can execute any method in managed code that is declared void and takes no parameters.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public delegate void MethodInvoker()

MethodInvoker provides a simple delegate that is used to invoke a method with a void parameter list. This delegate can be used when making calls to a control's Invoke method, or when you need a simple delegate but do not want to define one yourself.

The following code example demonstrates how to use a MethodInvoker to call a method that updates the title bar of the application form.

No code example is currently available or this language may not be supported.

The following code example demonstrates how to use the MethodInvoker delegate to synchronize a call to a control's thread.


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft