-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Reflection_ReflectionExtensions_CreateInstance
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
Creates instance of type with specified parameters.
Namespace: CodeJam.Reflection
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static Object CreateInstance(
this Type type,
params ParamInfo[] parameters
)
VB
<ExtensionAttribute>
Public Shared Function CreateInstance (
type As Type,
ParamArray parameters As ParamInfo()
) As Object
F#
[<ExtensionAttribute>]
static member CreateInstance :
type : Type *
parameters : ParamInfo[] -> Object
- type
- Type: System.Type
Type to create instance. - parameters
- Type: CodeJam.Reflection.ParamInfo[]
Constructor parameters
Type: Object
Instance of type
In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exception | Condition |
---|---|
ArgumentNullException | type is null |
ArgumentException | No suitable constructors found |