# Subset<T> 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 sealed class Subset<T> : IEnumerable<T>
```

Create a subset indexer for arrays.

**Type parameters:**

- `T`

## Constructors

- [Subset<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/ctor.md): Create a new subset.

## Properties

- [Array](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/array.md): Gets the underlying array.
- [Indices](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/indices.md): Gets the subset indices.
- [Length](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/length.md): Gets the length of the subset.
- [SubsetItems](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/subsetitems.md): Enumerate over all items in the array subset.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/item.md): Gets the array item at the given subset index.

## Methods

- [ArrayIndex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/arrayindex.md): Gets the array index associated with the given subset index.
- [GetEnumerator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/getenumerator.md): Returns an enumerator that iterates through the collection.
- [IsPartOfSubset](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/ispartofsubset.md): Test whether the array index is covered by the subset map.
- [SubsetIndex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/subsetindex.md): Gets the subset index associated with the given array index.
- [IEnumerable.GetEnumerator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.subset-1/system-collections-ienumerable-getenumerator.md)
