Partilhar via


PSMethod.Invoke(Object[]) Method

Definition

Invokes the appropriate method overload for the given arguments and returns its result.

public:
 override System::Object ^ Invoke(... cli::array <System::Object ^> ^ arguments);
public override object Invoke (params object[] arguments);
override this.Invoke : obj[] -> obj
Public Overrides Function Invoke (ParamArray arguments As Object()) As Object

Parameters

arguments
Object[]

Arguments to the method.

Returns

Return value from the method.

Exceptions

If arguments is null.

For problems finding an appropriate method for the arguments.

For exceptions invoking the method.

Applies to