CreateInstanceAccessorCreateInstance(Object) Method

Creates a new instance using the associated constructor with one parameter.
See the Remarks section of the CreateInstance(Object) overload for details.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public Object CreateInstance(
	Object? param
)

Parameters

param  Object
The value of the parameter.

Return Value

Object
The created instance.

Exceptions

ArgumentExceptionThe type of the specified parameter is invalid.
-or-
The constructor cannot be invoked with one parameter.
InvalidOperationExceptionThis CreateInstanceAccessor represents a static constructor, a constructor of an abstract class, or.a constructor of an open generic type.
NotSupportedExceptionOn .NET Framework the code is executed in a partially trusted domain with insufficient permissions.

See Also