日期:2014-05-17 浏览次数:20760 次
hashtable ht=new hashtable();
ht.add("0",object);
foreach (DictionaryEntry v in ht)
{
满足一个条件时;
ht[v]=赋值;
}
Hashtable ht = new Hashtable();
ht.Add("0", "123");
ht.Add("1", "222");
ArrayList keyList = new ArrayList(ht.Keys);
for (int i = 0; i < ht.Count; i++)
{
if (keyList[i] == "0")
ht[keyList[i]] = "456";
}