PSMethodInfo.Invoke(Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the appropriate method overload for the given arguments and returns its result.
public:
abstract System::Object ^ Invoke(... cli::array <System::Object ^> ^ arguments);
public abstract object Invoke (params object[] arguments);
abstract member Invoke : obj[] -> obj
Public MustOverride 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. This exception is also thrown for an PSScriptMethod when there is no Runspace to run the script.