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) { StringBuilder tmp = new StringBuilder(); //needs System.Text; foreach ( Object o in arrayList ) { tmp.Append("<br />" + o); } return tmp.ToString(); }