public void AsDictionary() { var a = new System.Collections.Specialized.NameValueCollection { { "1", "one" }, { "1", "uno" }, }; var d = a.AsDictionary(); Assert.AreEqual(new[] { "one", "uno" }, d["1"]); Assert.Throws <KeyNotFoundException>(() => { var x = d["2"]; }); }