Method Invoke
Invoke(Delegate?, object?[]?)
Executes the specified delegate, on the UI thread, with the specified list of arguments.
public static object? Invoke(Delegate? method, object?[]? args)
Parameters
methodDelegateA delegate to a method that takes parameters of the same number and type that are contained in the
argsparameter.argsobject[]An array of objects to pass as arguments to the specified method. This parameter can be
nullif the method takes no arguments.
Returns
- object
An object that contains the return value from the delegate being invoked, or
nullif the delegate has no return value.
Invoke(Action?)
Executes the specified action, on the UI thread.
public static void Invoke(Action? action)
Parameters
actionAction