现在的位置: 首页 > 综合 > 正文

HashTable使用

2013年04月05日 ⁄ 综合 ⁄ 共 327字 ⁄ 字号 评论关闭

1:Hashtable遍历

HashTable hash = new HashTable();

hash.Add(1,"aa");

hash.Add(2,"bb");

Foreach(DictionaryEntity em in hash)

{

   response.write("{0}:{1}",em.Key,em.Value);

System.Collections.IDictionaryEnumerator enumerator =  hash.GetEnumerator();

while(enumerator.MoveNext())

{

  Response.write("{0}:{1}",enumerator.Key,enumerator.Value);

 待完善...

抱歉!评论已关闭.