1

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"]);
user310291
  • 36,946
  • 82
  • 271
  • 487
  • 1
    "@metadata" isn't anything special here, just a string key defined in the dictionary that points to some object. You could define the keys to a `var a = new Dictionary { ["a"] = new Object(), ["b"] = new Object() }` just the same – James Jan 25 '17 at 05:21

1 Answers1

2

Yes, it's part of C# syntax - using the new indexer initializer available in C#6.

Community
  • 1
  • 1
Rob
  • 26,989
  • 16
  • 82
  • 98