# TypeUtility class

Namespace: [Grasshopper2.Types](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class TypeUtility
```

Provides some utility methods for types whose exact state may be unknown at compiletime.

## Methods

- [CanDuplicate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeutility/canduplicate.md): (4 overloads, static) Test whether a duplication mechanism is available for the given object.
- [DetermineFlavour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeutility/determineflavour.md): (3 overloads, static) Figure out the TypeFlavour of a specific type. Note that this overload is unable to determine whether the value is a nullable struct. If a nullable struct is supplied and it's null, TypeFlavour.None is returned. If the type is not null, TypeFlavour.Struct is returned. We recommend using the DetermineFlavour<T<() overload.
- [GetDuplicationDelegate<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeutility/getduplicationdelegate.md): (2 overloads, static) Try and get a duplication delegate that fits the relevant type. Duplication delegates can be constructed for structs, nullable structs, types with registered TypeAssistants, and types that implement ICloneable, ISerializable and/or IStorable, in that order.
- [IsNullable<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeutility/isnullable.md): (static) Gets whether a specific type is a struct.
- [TryDuplicateObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeutility/tryduplicateobject.md): (2 overloads, static) Try and duplicate an object. Duplication is defined for structs, nullable structs, types with registered TypeAssistants, and types that implement ICloneable, ISerializable and/or IStorable, in that order.
