public static Object CreateInstance(
Type type,
ReflectionWays way,
params Object?[]? parameters
)
Public Shared Function CreateInstance (
type As Type,
way As ReflectionWays,
ParamArray parameters As Object()
) As Object
public:
static Object^ CreateInstance(
Type^ type,
ReflectionWays way,
... array<Object^>^ parameters
)
static member CreateInstance :
type : Type *
way : ReflectionWays *
parameters : Object[] -> Object
If you are not sure whether the type can be created by the provided parameters, then you can use the TryCreateInstance methods instead.
If way is Auto, then this method uses the DynamicDelegate way, unless for value types with empty or parameters, in which case the SystemReflection way is selected, which will use the Activator class.