Reputation: 38180
What ["@metadata"] means is it .NET syntax ? :
https://dzone.com/articles/answer-what-does-this-code-do
var doc = new Dictionary<string,object>
{
["@metadata"] = new Dictionary<string, object>
{
["@id"] = "users/1"
}
["Name"] = "Oren"
};
Console.WriteLine(doc["Name"]);
Upvotes: 1
Views: 163
Reputation: 27357
Yes, it's part of C# syntax - using the new indexer initializer available in C#6.
Upvotes: 2