MethodAccessorInvokeStaticFunctionT1, T2, TResult(T1, T2) Method

Invokes a static function method with two parameters. If the type of the parameters or the return value are not known at compile time the non-generic Invoke methods can be used.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public TResult InvokeStaticFunction<T1, T2, TResult>(
	T1 param1,
	T2 param2
)

Parameters

param1  T1
The value of the first parameter.
param2  T2
The value of the second parameter.

Type Parameters

T1
The type of the first parameter.
T2
The type of the second parameter.
TResult
The return type of the method.

Return Value

TResult
The return value of the method.

Exceptions

NotSupportedExceptionThis MethodAccessor represents a method with more than four parameters.
InvalidOperationExceptionThis MethodAccessor represents an instance method, an open generic method or a method of an open generic type.
ArgumentExceptionThe number or types of the type arguments are invalid.
PlatformNotSupportedExceptionYou use the .NET Standard 2.0 build of KGySoft.CoreLibraries and this MethodAccessor represents a ref-returning method.

See Also