 | ReflectionUtilsCreateInstanceFromType Method |
Creates an instance from a type by calling the parameterless constructor.
Note this will not work with COM objects - continue to use the Activator.CreateInstance
for COM objects.
Namespace:
Koden.Utils
Assembly:
Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntaxpublic static Object CreateInstanceFromType(
Type typeToCreate,
params Object[] args
)
Public Shared Function CreateInstanceFromType (
typeToCreate As Type,
ParamArray args As Object()
) As Object
public:
static Object^ CreateInstanceFromType(
Type^ typeToCreate,
... array<Object^>^ args
)
static member CreateInstanceFromType :
typeToCreate : Type *
args : Object[] -> Object
Parameters
- typeToCreate
- Type: SystemType
The type from which to create an instance. - args
- Type: SystemObject
The arguments.
Return Value
Type:
Object
object
See Also