首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

string如何into到Hashtable

2012-02-11 
string怎么into到Hashtable?请问string怎么into到Hashtable?[解决办法]Hashtable ht new Hashtable()ht

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

热点排行