Click or drag to resize

GH_ParamTInstantiateT Method

Attempts to instantiate a new instance of T.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
protected virtual T InstantiateT()

Return Value

Type: T
This function should return a newly constructed instance of T.
Remarks
If T is an abstract class or if T has no default (empty) constructor, this function will ASSERT. In order to avoid a Try...Catch block performance impact, override this function and call the type constructor for T directly.
See Also