Yes; just uses braces instead of parentheses.
var nvc = new NameValueCollection { {"a", "1"}, {"b", "2"} };
You can call Add methods with arbitrary sets of parameters using the syntax.
Yes; just uses braces instead of parentheses.
var nvc = new NameValueCollection { {"a", "1"}, {"b", "2"} };
You can call Add methods with arbitrary sets of parameters using the syntax.