TYPE

IDictionary<TKey,TValue>

Key-based association contract; mutation support depends on implementation.

Formal Syntax & Structure

csharp syntaxcsharp
IDictionary<TKey,TValue>

Working Example

Example Snippetcsharp
using System.Collections.Generic;IDictionary<string,int> stock = new Dictionary<string,int>();stock["pen"] = 2;
C# & .NET Reference