问个关于HASHMAP的问题
C#中,HASHMAP的命名空间是什么?
下面是一个小的例子:

using System.Collections.Generic; using System; namespace Test { class Test { static void Main() { // 第一个方法 Dictionary<string, string> map = new Dictionary<string, string>(); map["first"] = "one"; map["second"] = "two"; map["third"] = "three"; // 第二个方法 map = new Dictionary<string, string> { {"first", "one"}, {"second", "two"}, {"third", "three"} }; foreach (var pair in map) { Console.WriteLine("{0}: {1}", pair.Key, pair.Value); } Console.ReadLine(); } } }