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

A list of named values with one unnamed value always available.

**Type parameters:**

- `T`

## Constructors

- [NamedListWithDefault<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/ctor.md): Create a new list with an unnamed default value.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/count.md): Gets the number of values, not including the unnamed value.
- [Named](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/named.md): Gets the underlying dictionary of named values.
- [Names](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/names.md): Iterate over all names.
- [Unnamed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/unnamed.md): Gets or sets the unnamed default.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/item.md): (2 overloads) Gets the indexed value. Zero represents the unnamed value, higher integers index the named list.

## Methods

- [TryGet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/tryget.md): Try and retrieve one of the values.
- [TryRemove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.namedlistwithdefault-1/tryremove.md): Try and remove the named value. Note that the unnamed value cannot be removed, you can only change the value it has.
