I have a NameValueCollection and you want to NameValueCollection over the values. I'm currently doing this, but there seems to be a tidier way to do this:
NameValueCollection nvc = new NameValueCollection(); nvc.Add("Test", "Val1"); nvc.Add("Test2", "Val1"); nvc.Add("Test2", "Val1"); nvc.Add("Test2", "Val2"); nvc.Add("Test3", "Val1"); nvc.Add("Test4", "Val4"); foreach (string s in nvc) foreach (string v in nvc.GetValues(s)) Console.WriteLine("{0} {1}", s, v); Console.ReadLine();
Whether there is a?
collections c # namevaluecollection
Paul Michaels Feb 21 '11 at 12:30 2011-02-21 12:30
source share