C# Hashtable 读取 key 和 value


public
static Hashtable hashtable = new Hashtable();

hashtable.Add("a","aaaaaaaa");
///......

foreach(DictionaryEntry h in hashtable)
{
Console.WriteLine(h.Key.ToString() + h.Value.ToString());
}
posted on 2011-12-07 11:51  忧郁的匹格  阅读(3684)  评论(0编辑  收藏  举报