最佳答案
有没有一种使用 C # 集合初始化器语法来初始化 NVC 的方法:
NameValueCollection nvc = new NameValueCollection() { ("a", "1"), ("b", "2") };
谢谢