# TypePair 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 TypePair : IComparable<TypePair>, IEquatable<TypePair>
```

Ordered pair of Types.

## Constructors

- [TypePair](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/ctor.md): Create a new type pair.

## Properties

- [TypeA](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/typea.md): Gets the id of the from conversion type.
- [TypeB](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/typeb.md): Gets the id of the to conversion type.

## Methods

- [Create<T1, T2>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/create.md): (2 overloads, static) Create a type pair through generic means.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/gethashcode.md): Serves as the default hash function.
- [GetNameCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/getnamecode.md): Gets a string description of this typepair.
- [IComparable<TypePair>.CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/system-icomparable-grasshopper2-types-typepair-compareto.md)
- [IEquatable<TypePair>.Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/system-iequatable-grasshopper2-types-typepair-equals.md)
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.typepair/tostring.md): Returns a string that represents the current object.
