Note
If an instance can be created by its parameterless constructor and the constructor itself has thrown an exception, then this method also throws an exception instead of returning .
public static bool TryCreateInstance(
Type type,
Type[]? genericParameters,
out Object?? result
)
Public Shared Function TryCreateInstance (
type As Type,
genericParameters As Type(),
<OutAttribute> ByRef result As Object
) As Boolean
public:
static bool TryCreateInstance(
Type^ type,
array<Type^>^ genericParameters,
[OutAttribute] Object^% result
)
static member TryCreateInstance :
type : Type *
genericParameters : Type[] *
result : Object byref -> bool
For creating the instance this method uses the DynamicDelegate way.