Each dictionary value is a List, so you must create new List instances inside the dictionary initializer.
Step 2: Check syntax correctness
var dict = new Dictionary> { { "a", new List {1, 2} }, { "b", new List {3, 4} } }; correctly uses nested initializers: dictionary with key-value pairs, where values are new List with their own initializers.
Final Answer:
var dict = new Dictionary> { { "a", new List {1, 2} }, { "b", new List {3, 4} } }; -> Option A
Quick Check:
Nested collections need explicit new List [OK]
Quick Trick:Use 'new' for nested collections inside dictionary [OK]
Common Mistakes:
MISTAKES
Omitting 'new List' for nested lists
Using parentheses or brackets incorrectly
Trying to use colon syntax inside C# initializers
Master "Collections" in C Sharp (C#)
9 interactive learning modes - each teaches the same concept differently