interface ISynchronizeInvoke

in global :: System . ComponentModel

Provides a way to synchronously or asynchronously execute a delegate.


public IAsyncResult BeginInvoke( Delegate method, object[] args )

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

  • method A to a method that takes parameters of the same number and type that are contained in .
  • args An array of type to pass as arguments to the given method. This can be if no arguments are needed.
  • Returns An interface that represents the asynchronous operation started by calling this method.

public object EndInvoke( IAsyncResult result )

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

  • result An interface that represents the asynchronous operation started by calling .
  • Returns An that represents the return value generated by the asynchronous operation.

public object Invoke( Delegate method, object[] args )

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

  • method A that contains a method to call, in the context of the thread for the control.
  • args An array of type that represents the arguments to pass to the given method. This can be if no arguments are needed.
  • Returns An that represents the return value from the delegate being invoked, or if the delegate has no return value.

public bool InvokeRequired { get; }

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

  • Returns if the caller must call ; otherwise, .