ISynchronizeInvoke Interface


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Provides a way to synchronously or asynchronously execute a delegate.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public interface ISynchronizeInvoke


Gets a value indicating whether the caller must call Invoke when calling an object that implements this interface.

System_CAPS_pubmethodBeginInvoke(Delegate, Object[])

Asynchronously executes the delegate on the thread that created this object.


Waits until the process started by calling BeginInvoke completes, and then returns the value generated by the process.

System_CAPS_pubmethodInvoke(Delegate, Object[])

Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.

The ISynchronizeInvoke 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 ISynchronizeInvoke class provides two ways to invoke a process:

  1. Asynchronously, by using the BeginInvoke method. BeginInvoke starts a process and then returns immediately. Use EndInvoke to wait until the process started by BeginInvoke completes.

  2. 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.

.NET Framework
Available since 1.1
Return to top