# BoundedList<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 BoundedList<T>
```

A list with a capped capacity which throws away the oldest element when newly added elements would cause a capacity overrun. This collection is threadsafe.

**Type parameters:**

- `T`

## Constructors

- [BoundedList<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/ctor.md)

## Properties

- [Capacity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/capacity.md): Gets the maximum capacity of this collection.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/count.md): Gets the total number of elements currently in this collection.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/item.md)

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/add.md): Add a new element in the most important slot in this collection.
- [MoveToFront](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/movetofront.md): Move the item at the given index to the front of the list.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.boundedlist-1/remove.md): Remove the element at the given index.
