Dump on a NameValueCollection
Calling the
Dump
method on a NameValueCollection only shows the names of the keys and not the values. Can this be changed to also show the value next to the corresponding key please, @JoeAlbahari ?var nvc = new System.Collections.Specialized.NameValueCollection();
nvc["foo"] = "bar";
nvc["hello"] = "world";
nvc.Dump();
NameValueCollection (2 items)This collection class is quite useful when using the
foo
hello
System.Net.WebClient
's UploadValues
method.
Comments
nvc.AllKeys.Select(ak => new { Key = ak, Value = nvc[ak] }).Dump();
http://www.linqpad.net/download.aspx#beta