C Sharp (C#) - Collections
Identify the error in this code snippet:
var dict = new Dictionary<string, int>();
dict.Add("a", 1);
dict.Add("a", 2);
Console.WriteLine(dict["a"]);