c# inline initialize dictionary

C#
var testDict = new Dictionary<string, string>() { ["key1"] = "value1", ["key2"] = "value2" };
Source

Also in C#: