Provides a way to synchronously or asynchronously execute a delegate.
Assembly: System (in System.dll)
Thetype exposes the following members.
|BeginInvoke||Asynchronously executes the delegate on the thread that created this object.|
|EndInvoke||Waits until the process started by calling BeginInvoke completes, and then returns the value generated by the process.|
|Invoke||Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.|
The interface provides synchronous and asynchronous communication between objects about the occurrence of an event. Objects that implement this interface can receive notification that an event has occurred, and they can respond to queries about the event. In this way, clients can ensure that one request has been processed before they submit a subsequent request that depends on completion of the first.
The class provides two ways to invoke a process:
Synchronously, by using the Invoke method. Invoke starts a process, waits until it completes, and then returns. Use Invoke when the control's main thread is different from the calling thread to marshal the call to the proper thread.
The HostProtectionAttribute attribute applied to this class has the following Resources property value: Synchronization | ExternalThreading. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.
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.