C#转换集合类型为html源码输出
2021-06-20 04:04
标签:obj tor cti table enum 资料 代码 get hashtable C#转换集合类型为html源码输出 标签:obj tor cti table enum 资料 代码 get hashtable 原文地址:http://blog.51cto.com/14152780/2342463
public static string ToHTML(Hashtable hashtable) {
string tmp = "";
IDictionaryEnumerator myEnumerator = hashtable.GetEnumerator();
while ( myEnumerator.MoveNext() ) {
tmp += "
" + myEnumerator.Key+", "+ myEnumerator.Value;
}
return tmp;
}
public static string ToHTML(ArrayList arrayList) {
foreach ( Object o in arrayList ) {
tmp.Append("
" + o);
}
return tmp.ToString();
}