You can use collection initializers with everything that the Add method has. Yes, the duck is printing. If Add has more than 1 pair, put the tuples in braces:
NameValueCollection nvc = new NameValueCollection() { { "a", "1" }, { "b", "2" } };
Andrey Feb 24 '11 at 16:25 2011-02-24 16:25
source share