NameValueCollection集合
来源:互联网 发布:python中文编码问题 编辑:程序博客网 时间:2024/05/01 11:28
NameValueCollection,它有一个特点:允许在一个键下存储多个字符串值。
NameValueCollection query = new NameValueCollection();query.Add("MVC", "Model");query.Add("MVC", "Control");query.Add("MVC", "View");query.Add("ASP.NET", "MVC");StringBuilder sb = new StringBuilder();foreach (string key in query.Keys){ // sb.AppendFormat("{0}={1}", key, query[key]); string[] values = query[key].Split(new char[] { ',' }); if (values.Count() > 1) foreach (var value in values) { sb.AppendFormat("{0}={1}\r\n", key, value); } else { sb.AppendFormat("{0}={1}\r\n", key,query[key]); }}Console.WriteLine(sb.ToString());
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- NameValueCollection集合
- C# NameValueCollection集合
- C# NameValueCollection集合 实例
- C# NameValueCollection集合
- C# NameValueCollection集合
- C# NameValueCollection集合
- NameValueCollection类集合
- C# NameValueCollection集合
- NameValueCollection
- NameValueCollection详解
- NameValueCollection详解
- NameValueCollection详解
- NameValueCollection详解
- NameValueCollection 用法
- NameValueCollection详解
- NameValueCollection详解
- NameValueCollection详解
- NameValueCollection详解
- 安装svn for myeclipse插件的时候提示“Failed to load JavaHL Library.”
- Remove Duplicates from Sorted List
- shell for循环用法总结
- Python变量函数:函数名存在变量中
- 快速排序
- NameValueCollection集合
- Hbase的SQL接口之Phoenix使用总结(1)
- spoj1182
- 1019、最大乘积连续子串解析
- 睡眠关机脚本
- 日志操作实现思路
- C#用什么方法可以减少或不使用switch
- PKU ACM/ICPC竞赛队最近八年比赛成绩
- Android实现电话状态监控