CreateInstanceAccessorCreateInstanceTInstance, T(T) Method

Creates a new instance using the associated constructor with one parameter.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public TInstance CreateInstance<TInstance, T>(
	T param
)

Parameters

param  T
The value of the parameter.

Type Parameters

TInstance
The type of the created instance.
T
The type of the parameter.

Return Value

TInstance
The created instance.

Exceptions

NotSupportedExceptionThis CreateInstanceAccessor represents a constructor with more than four parameters.
ArgumentExceptionThe number or types of the type arguments are invalid.
InvalidOperationExceptionThis CreateInstanceAccessor represents a static constructor, a constructor of an abstract class, or.a constructor of an open generic type.

See Also