c#遍历HashTable

xiaoxiao2026-06-13  7

 

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值 } foreach(object key in objHastab.keys) { Element e=(Element)objHashtab[key]; } 相关资源:Java 面经手册·小傅哥(公众号:bugstack虫洞栈).pdf
转载请注明原文地址: https://www.6miu.com/read-5050095.html

最新回复(0)