MethodAccessorInvokeInstanceActionTInstance(TInstance) Method

Invokes a parameterless instance action method in a value type. If the type of the declaring instance is 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 void InvokeInstanceAction<TInstance>(
	 in TInstance instance
)
where TInstance : struct, new()

Parameters

instance  TInstance
The instance that the method belongs to.

Type Parameters

TInstance
The type of the instance that declares 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.
ArgumentExceptionThe number or types of the type arguments are invalid.

See Also