读书人

string如何into到Hashtable

发布时间: 2012-02-11 09:51:34 作者: rapoo

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方法的第一个参数是键,第二个是值。

读书人网 >asp.net

热点推荐