次の方法で共有


IVsDataHostService.InvokeOnUIThread(Delegate, Object[]) Method

Definition

Synchronously executes a specified method on the main thread running in the Visual Studio process, with the specified list of arguments.

public:
 System::Object ^ InvokeOnUIThread(Delegate ^ method, ... cli::array <System::Object ^> ^ args);
public object InvokeOnUIThread (Delegate method, params object[] args);
abstract member InvokeOnUIThread : Delegate * obj[] -> obj
Public Function InvokeOnUIThread (method As Delegate, ParamArray args As Object()) As Object

Parameters

method
Delegate

A delegate to a method that takes parameters of the same number and type that are contained in the args parameter.

args
Object[]

An array of objects to pass as arguments to the specified method. This parameter can be null if the method takes no arguments.

Returns

An Object that contains the return value from the delegate being invoked, or null if the delegate has no return value.

Exceptions

any

The specified method threw an exception.

Applies to