foreach (System.Collections.DictionaryEntry objDE in objHasTab) { Console.WriteLine(objDE.Key.ToString()); Console.WriteLine(objDE.Value.ToString()); }
System.Collections.IDictionaryEnumerator enumerator = objHashTablet.GetEnumerator(); while (enumerator.MoveNext()) { Console.WriteLine(enumerator.Key); // Hashtable关健字 Console.WriteLine(enumerator.Value); // Hashtable值 }