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)
Syntax protected virtual T PreferredCast(
Object data
)
Protected Overridable Function PreferredCast (
data As Object
) As T
Parameters
- data
- Type: SystemObject
Data to convert. Data is never null.
Return Value
Type:
TAn instance of T or null if you did not handle the cast.
See Also