Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC#List and DictionarySingle-choice MCQ

Given a Dictionary, what is the result of running this code?

var ages = new Dictionary<string, int>(); ages["alice"] = 30; ages["alice"] = 31; ages.Add("bob", 25); Console.WriteLine(ages["alice"] + "," + ages.Count);