Dictionaries use curly braces with key-value pairs inside another set of braces: { {key, value}, ... }.
Step 2: Check each option
var dict = new Dictionary { {1, "One"}, {2, "Two"} }; uses correct syntax with nested braces for each pair. Others use invalid syntax for C# dictionaries.
Final Answer:
var dict = new Dictionary { {1, "One"}, {2, "Two"} }; -> Option D
Quick Check:
Dictionary init = nested braces for pairs [OK]
Quick Trick:Use double braces for dictionary key-value pairs [OK]
Common Mistakes:
MISTAKES
Using colon instead of comma between key and value
Trying to use parentheses instead of braces
Confusing dictionary syntax with object initializers
Master "Collections" in C Sharp (C#)
9 interactive learning modes - each teaches the same concept differently