Hastable 用法及循环读取
程序员文章站
2022-04-23 22:44:36
...
string strlist = ""; Hashtable hastable = new Hashtable(); hastable.Add("chen", "5"); hastable.Add("jian", "6"); hastable.Add("ping", "7"); IDictionaryEnumerator hsEnum = hastable.GetEnumerator(); while (hsEnum.MoveNext()) { strlist += hsE
string strlist = "";
Hashtable hastable = new Hashtable();
hastable.Add("chen", "5");
hastable.Add("jian", "6");
hastable.Add("ping", "7");
IDictionaryEnumerator hsEnum = hastable.GetEnumerator();
while (hsEnum.MoveNext())
{
strlist += hsEnum.Value.ToString() + hsEnum.Key.ToString();
}
Response.Write(strlist);
推荐阅读