Editare

Partajați prin


MethodInvoker.Invoke Method

Definition

Overloads

Invoke(Object)

Invokes the method using the specified arguments.

Invoke(Object, Object)

Invokes the method using the specified arguments.

Invoke(Object, Span<Object>)

Invokes the method using the specified arguments.

Invoke(Object, Object, Object)

Invokes the method using the specified arguments.

Invoke(Object, Object, Object, Object)

Invokes the method using the specified arguments.

Invoke(Object, Object, Object, Object, Object)

Invokes the method using the specified arguments.

Invoke(Object)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj);
public object? Invoke (object? obj);
member this.Invoke : obj -> obj
Public Function Invoke (obj As Object) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Exceptions

The obj argument is null and the method is not static.

-or-

The method is not declared or inherited by the class of obj.

The type that declares the method is an open generic type.

An incorrect number of arguments was provided.

The calling convention or signature is not supported.

Applies to

Invoke(Object, Object)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj, System::Object ^ arg1);
public object? Invoke (object? obj, object? arg1);
member this.Invoke : obj * obj -> obj
Public Function Invoke (obj As Object, arg1 As Object) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

arg1
Object

The first argument for the invoked method.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Exceptions

The arguments do not match the signature of the invoked method.

Applies to

Invoke(Object, Span<Object>)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj, Span<System::Object ^> arguments);
public object? Invoke (object? obj, Span<object?> arguments);
member this.Invoke : obj * Span<obj> -> obj
Public Function Invoke (obj As Object, arguments As Span(Of Object)) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

arguments
Span<Object>

The arguments for the invoked method.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Exceptions

The arguments do not match the signature of the invoked method.

Applies to

Invoke(Object, Object, Object)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj, System::Object ^ arg1, System::Object ^ arg2);
public object? Invoke (object? obj, object? arg1, object? arg2);
member this.Invoke : obj * obj * obj -> obj
Public Function Invoke (obj As Object, arg1 As Object, arg2 As Object) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

arg1
Object

The first argument for the invoked method.

arg2
Object

The second argument for the invoked method.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Applies to

Invoke(Object, Object, Object, Object)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj, System::Object ^ arg1, System::Object ^ arg2, System::Object ^ arg3);
public object? Invoke (object? obj, object? arg1, object? arg2, object? arg3);
member this.Invoke : obj * obj * obj * obj -> obj
Public Function Invoke (obj As Object, arg1 As Object, arg2 As Object, arg3 As Object) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

arg1
Object

The first argument for the invoked method.

arg2
Object

The second argument for the invoked method.

arg3
Object

The third argument for the invoked method.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Applies to

Invoke(Object, Object, Object, Object, Object)

Source:
MethodInvoker.cs
Source:
MethodInvoker.cs

Invokes the method using the specified arguments.

public:
 System::Object ^ Invoke(System::Object ^ obj, System::Object ^ arg1, System::Object ^ arg2, System::Object ^ arg3, System::Object ^ arg4);
public object? Invoke (object? obj, object? arg1, object? arg2, object? arg3, object? arg4);
member this.Invoke : obj * obj * obj * obj * obj -> obj
Public Function Invoke (obj As Object, arg1 As Object, arg2 As Object, arg3 As Object, arg4 As Object) As Object

Parameters

obj
Object

The object on which to invoke the method. If the method is static, this argument is ignored.

arg1
Object

The first argument for the invoked method.

arg2
Object

The second argument for the invoked method.

arg3
Object

The third argument for the invoked method.

arg4
Object

The fourth argument for the invoked method.

Returns

An object containing the return value of the invoked method, or null if the invoked method does not have a return value.

Applies to