I'm coming from JavaScript, and I know that { }
is an object literal, not needing to require the new Object
call; I'm wondering if it's the same with C# in the {"id",id}, {"saveChangesError",true}
part.
I know there are two C# features in here, care to explain to me more about what they are?
new RouteValueDictionary()
{ //<------------------------------[A: what C# feature is this?] -------||
{"id",id}, //<------------------[B: what C# feature is this also?] ||
{"saveChangesError",true} ||
}); //<------------------------------------------------------------------||
Add
in particular) after the object has been created. – Beltnew Foo { Bar = Quz }
.) – Belt