KJ,
No, I don't believe there is. This would require some work on the
compiler's part to recognize that syntax.
You will have to use the Add method ultimately to add the name/value
pairs.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"KJ" <n_**********@mail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Is there some way to achieve something this (without calling the Add
method of the collection)?:
NameValueCollection nvc = new NameValueCollection() {"foo"="bar",
"a"="b"};
-Thanks