MethodAccessorInvokeInstanceFunctionTInstance, T, TResult(TInstance, T) Method

Invokes an instance function method with one parameter in a reference type. If the type of the parameter, the return value or the declaring instance 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 InvokeInstanceFunction<TInstance, T, TResult>(
	TInstance instance,
	T param
)
where TInstance : class

Parameters

instance  TInstance
The instance that the method belongs to.
param  T
The value of the parameter.

Type Parameters

TInstance
The type of the instance that declares the method.
T
The type of the 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 a static method, an open generic method or a method of an open generic type.
ArgumentNullExceptioninstance is .
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