CreateInstanceAccessorCreateInstance(Object, Object) Method

Creates a new instance using the associated constructor with two parameters.
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? param1,
	Object? param2
)

Parameters

param1  Object
The value of the first parameter.
param2  Object
The value of the second parameter.

Return Value

Object
The created instance.

Exceptions

ArgumentExceptionThe type of a specified parameter is invalid.
-or-
The constructor cannot be invoked with two parameters.
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