# NamedList<T> class

Namespace: [GrasshopperIO.DataBase](https://developer.rhino3d.com/api/gh2/namespace/grasshopperio.database.md) · Assembly: [GrasshopperIO](https://developer.rhino3d.com/api/gh2/assembly/grasshopperio.md)

```cs
[DebuggerDisplay("items:{Count}")]
public class NamedList<T>
```

An immutable list of values which have names. Note that eventhrough the collection itself is immutable, the values it contains may not be.

**Type parameters:**

- `T`

## Constructors

- [NamedList<T>](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/ctor.md): Create a new, empty keyed list.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/count.md): Gets the number of elements.
- [Items](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/items.md): Iterate over all items in this collection.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/item.md): (2 overloads) Gets the instance at the given index.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/add.md): Add a new instance to this collection. This method will throw in case of a name collision.
- [AddRange](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/addrange.md): Add new instances to this collection. This method will throw in case of a name collision.
- [Contains](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/contains.md): Test whether a specific name has already been defined.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/remove.md): Remove a specific instance from this collection. Note, the instance must be part of this collection, it is not enough for the instance key to be present.
- [RemoveName](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/removename.md): Remove a specific Name+T pair from this collection.
- [Replace](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/replace.md): Replace an item.
- [TryFind](https://developer.rhino3d.com/api/gh2/type/grasshopperio.database.namedlist-1/tryfind.md): Try and find the item with the given name.
