# DualArray<T1, T2> class

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

```cs
public class DualArray<T1, T2>
```

Maintains and synchronizes two arrays. Note: this is probably useless now that Tuples are part of the lang.spec.

**Type parameters:**

- `T1`
- `T2`

## Constructors

- [DualArray<T1, T2>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/ctor.md): (4 overloads) Create a new, empty multi-array.

## Properties

- [A](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/a.md): Get access to the internal T1 array.
- [AItems](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/aitems.md): Enumerate over all T1 items.
- [B](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/b.md): Get access to the internal T2 array.
- [BItems](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/bitems.md): Enumerate over all T2 items.
- [Capacity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/capacity.md): Gets the capacity for each array.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/count.md): Gets the number of items stored in each array.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/add.md): Add a pair to this multi array.
- [Clear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/clear.md): Clear the array.
- [ContainsA](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/containsa.md): Gets whether a value equal to item is already part of the T1 array.
- [ContainsB](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/containsb.md): Gets whether a value equal to item is already part of the T2 array.
- [EnsureCapacity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/ensurecapacity.md): Ensure the capacity of this multi-array is at least the given amount.
- [FindA](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/finda.md): (2 overloads) Find the first occurence of a T1 item.
- [FindB](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/findb.md): (2 overloads) Find the first occurence of a T2 item.
- [Insert](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/insert.md): Insert a pair into this multi array.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/remove.md): Remove the values at the given index.
- [Replace](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/replace.md): Replace the values at the given index.
- [ToAArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/toaarray.md): Copy the internal T1 array into a new array.
- [ToBArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/tobarray.md): Copy the internal T2 array into a new array.
- [TrimExcess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.dualarray-2/trimexcess.md): Release unused memory.
