Note
To invoke the constructor explicitly by dynamically created delegates use the CreateInstanceAccessor class.
public static Object CreateInstance(
ConstructorInfo ctor,
ReflectionWays way,
params Object?[]? parameters
)
Public Shared Function CreateInstance (
ctor As ConstructorInfo,
way As ReflectionWays,
ParamArray parameters As Object()
) As Object
public:
static Object^ CreateInstance(
ConstructorInfo^ ctor,
ReflectionWays way,
... array<Object^>^ parameters
)
static member CreateInstance :
ctor : ConstructorInfo *
way : ReflectionWays *
parameters : Object[] -> Object
If way is Auto, then the DynamicDelegate way will be used, except when the .NET Standard 2.0 version of the KGySoft.CoreLibraries assembly is referenced and the constructor has ref/out parameters, in which case the SystemReflection way will be used.