标签:
方法一:
IDictionaryEnumerator enumerator = thProduct.GetEnumerator();
while (enumerator.MoveNext())
{
arrKey.Add("@"+enumerator.Key.ToString()); // Hashtable关健字
arrValue.Add(enumerator.Value.ToString()); // Hashtable值
}
方法二:
using System.Collections;
HashTable objHasTab;
// Setting values to objHasTab
foreach (DictionaryEntry objDE in objHasTab)
{
Console.WriteLine(objDE.Key.ToString());
Console.WriteLine(objDE.Value.ToString());
}
标签:
原文地址:http://www.cnblogs.com/fangl/p/4511138.html