Hashtable 模糊匹配

方法一: 
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()); 
}

posted @ 2015-05-18 09:35  菩提pro  阅读(308)  评论(0编辑  收藏  举报