# GH_Variant class

Namespace: [Grasshopper.Kernel.Expressions](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.expressions.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_Variant
```

Variant data used in Grasshopper Expressions.

## Constructors

- [GH_Variant](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/ctor.md): (10 overloads) Create a new Null variant.

## Properties

- [_Bool](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/bool.md): Gets the contents of this Variant as a bool.
- [_Complex](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/complex.md): Gets the contents of this Variant as a complex number.
- [_Double](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/double.md): Gets the contents of this Variant as a double. If the Variant is of type Integer this cast will also work.
- [_Int](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/int.md): Gets the contents of this Variant as an integer.
- [_Plane](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/plane.md): Gets the contents of this Variant as a Plane.
- [_Point](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/point.md): Gets the contents of this Variant as a Point.
- [_String](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/string.md): Gets the contents of this Variant as a String. This function will work for all Variant types.
- [_Vector](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/vector.md): Gets the contents of this Variant as a Vector.
- [IsNumeric](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/isnumeric.md): Gets a value indicating whether or not the Variant is a numeric type. Only Doubles and Integers are considered to be Numeric.
- [Type](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/type.md): Gets the Type of this Variant.

## Methods

- [Data<T>](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/data.md): Perform a straight cast of the data inside this Variant.
- [Duplicate](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/duplicate.md): Duplicate this Variant. If the type of this Variant is [unknown] the contents are not guaranteed to be duplicated.
- [Evaluate](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/evaluate.md): If this variant represents a string, this function will attempt to evaluate that string and replace the data inside this variant.
- [ToGoo](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/togoo.md): Attempt to convert a Variant to a Grasshopper IGH_Goo type.
- [ToString](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.expressions.gh-variant/tostring.md)
