# TypeUnification 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 sealed class TypeUnification
```

Create a collection of a single type from a stream of mixed types. This is useful for example when operating on collections which contain integer, doubles and complex numbers, and you wish to convert everything to the most complex type present.

## Constructors

- [TypeUnification](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/ctor.md): Create a new type unification.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/count.md): Gets the number of values stored.
- [UnitType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/unittype.md): Gets the type describing the current unification.
- [Values](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/values.md): Enumerate over the unitised values.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/item.md): Access the nth item.

## Methods

- [AddConversion<T1, T2>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/addconversion.md): Add a conversion from one type to another.
- [AddValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/addvalue.md): Add a value to this unification.
- [FindConversion](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/findconversion.md): Find the conversion method between two types.
- [ToArray<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/toarray.md): Convert this collection to an array of a specific type.
- [TowardsComplex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/towardscomplex.md): (static) Create a unification from int→BigInteger→double→Complex.
- [TowardsDouble](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/towardsdouble.md): (static) Create a unification from int→BigInteger→double.
- [TowardsVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typeunification/towardsvector.md): (static) Create a unification from int→BigInteger→double→Complex→Point3d→Vector3d.
