码迷,mamicode.com
首页 > Windows程序 > 详细

C#转换集合类型为html源码输出

时间:2019-01-14 17:17:52      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:obj   tor   cti   table   enum   资料   代码   get   hashtable   

把代码过程中经常用的内容做个珍藏,如下资料是关于C#转换集合类型为html输出的代码。
public static string ToHTML(Hashtable hashtable) {
string tmp = "";
IDictionaryEnumerator myEnumerator = hashtable.GetEnumerator();
while ( myEnumerator.MoveNext() ) {
tmp += "<br />" + myEnumerator.Key+", "+ myEnumerator.Value;
}
return tmp;
}
public static string ToHTML(ArrayList arrayList) {
foreach ( Object o in arrayList ) {
tmp.Append("<br />" + o);
}
return tmp.ToString();
}

C#转换集合类型为html源码输出

标签:obj   tor   cti   table   enum   资料   代码   get   hashtable   

原文地址:http://blog.51cto.com/14152780/2342463

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!