Click or drag to resize

GH_ParamTPreferredCast Method

Implement this function if you're certain that you'll be confronted with very common casts. For example, GH_Point has a preferred cast from Rhino.Geometry.Point3d and GH_Number has a preferred cast from System.Double.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
protected virtual T PreferredCast(
	Object data


Type: SystemObject
Data to convert. Data is never null.

Return Value

Type: T
An instance of T or null if you did not handle the cast.
See Also