日期:2014-05-18  浏览次数:20397 次

string怎么into到Hashtable?
请问string怎么into到Hashtable?

------解决方案--------------------
Hashtable ht = new Hashtable();
ht.Add( "str1 ", "字符串1 ");
ht.Add( "str2 ", "字符串2 ");

------解决方案--------------------
你不是要把字符串加到哈希表吗?
当然都是字符串了.
------解决方案--------------------
Hashtable ht = new Hashtable();
ht.Add( "str1 ", "字符串1 ");
str1-----关键字,用来提取字符串1
字符串1----你要传的字符串

------解决方案--------------------
HashTable中存的是键值对,Add方法的第一个参数是键,第二个是值。