public static Object CreateInstance(
Type type,
Type[]? genericParameters,
ReflectionWays way,
params Object?[]? parameters
)
Public Shared Function CreateInstance (
type As Type,
genericParameters As Type(),
way As ReflectionWays,
ParamArray parameters As Object()
) As Object
public:
static Object^ CreateInstance(
Type^ type,
array<Type^>^ genericParameters,
ReflectionWays way,
... array<Object^>^ parameters
)
static member CreateInstance :
type : Type *
genericParameters : Type[] *
way : ReflectionWays *
parameters : Object[] -> Object
If you are not sure whether the type can be created by the provided genericParameters and parameters, then you can use the TryCreateInstance methods instead.
If way is Auto, then this method uses the DynamicDelegate way.