TYPE

FrozenDictionary<TKey,TValue>

Immutable mapping designed for repeated lookup after construction. Does not freeze mutable value objects.

Formal Syntax & Structure

csharp syntaxcsharp
source.ToFrozenDictionary()

Working Example

Example Snippetcsharp
using System.Collections.Generic;using System.Collections.Frozen;var source = new Dictionary<string,int> { ["A"] = 1 };var frozen = source.ToFrozenDictionary();System.Console.WriteLine(frozen["A"]);
C# & .NET Reference