ActivatorCreateInstanceT Method |
Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor .
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static T CreateInstance<T>()
Type Parameters
- T
- The type to create.
Return Value
Type:
TA reference to the newly created object.
Exceptions Exception | Condition |
---|
MissingMethodException | The type that is specified for T does not have a parameterless constructor. |
See Also