# AgnosticDictionary<TValue> class

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

```cs
public sealed class AgnosticDictionary<TValue>
```

A dictionary which relies on type assistant based comparisons. This will be much slower than a System.Collections.Generic.Dictionary for types which can be stored in it, but it's completely type-agnostic.

**Type parameters:**

- `TValue`

## Constructors

- [AgnosticDictionary<TValue>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/ctor.md): Create an empty hash set.

## Properties

- [Cardinality](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/cardinality.md): Gets the number of elements (minus any null element) in this set.
- [CardinalityWithNull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/cardinalitywithnull.md): Gets the number of elements (including the null element) in this set.
- [HasNull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/hasnull.md): Gets whether this set contains a null value.
- [Keys](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/keys.md): Iterate over all elements in this set.
- [KeysWithNull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/keyswithnull.md): Iterate over all elements (inluding the null) in this set.
- [NullValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/nullvalue.md): Gets the value associated with the null key.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/add.md)
- [Contains](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.agnosticdictionary-1/contains.md): (2 overloads)
