Click or drag to resize
ActivatorCreateInstanceT Method
Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor .

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static T CreateInstance<T>()

Type Parameters

T
The type to create.

Return Value

Type: T
A reference to the newly created object.
Exceptions
ExceptionCondition
MissingMethodExceptionThe type that is specified for T does not have a parameterless constructor.
See Also