Example of Dictionary Initializer in C# 6.0

Below is a sample code snippet demonstrating the usage of Dictionary Initializer syntax in C# 6.0

Example of Dictionary Initializer in C# 6.0

var numbers = new Dictionary<int, string>
{
    [1] = "one",[2] = "two",[13] = "three"
};