NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MethodInfo.Invoke (Object, Object[])

Invokes the method reflected by this instance using the given parameters

[Visual Basic]
Overloads Public Function Invoke( _
   ByVal obj As Object, _
   ByVal parameters() As Object _
) As Object
[C#]
public object Invoke(
   object obj,
   object[] parameters
);
[C++]
public: Object* Invoke(
   Object* obj,
   Object* parameters[]
);
[JScript]
public function Invoke(
   obj : Object,
   parameters : Object[]
) : Object;

Parameters

obj
This object must be the object instance that created this method.
parameters
[To be supplied.]

Return Value

Returns a Variant containing the return value of the invoked method.

Exceptions

Exception Type Condition
TargetException obj is null.

The method is non-static and it is not declared or inherited by the class of obj.

ArgumentException The number, type and order of parameters do not match the signature of the method reflected by this instance.
AccessException The caller does not have permission to invoke the method.

The method invoked is a class initializer.

Remarks

This method is a convenience method that calls the following Invoke method, passing null in the other parameters.

If the invoked method throws an exception, TargetInvocationException.GetException() returns the exception.

You may not omit optional parameters with the Invoke method. If you must do so, use Type.InvokeMember instead.

See Also

MethodInfo Class | MethodInfo Members | System.Reflection Namespace | MethodInfo.Invoke Overload List