我在.net项目中遇到问题。我使用System.Collections.Hashtable存储的值,并添加像在System.Collections.Hashtable中搜索单词
键值“putreturnsbetweenparagraphs”
,我要搜索单词“之间”对键值。
我现在用的
//Declare hash table
System.Collections.Hashtable _Index;
//add values to hashtable
_Index.Add("putreturnsbetweenparagraphs",theword);
//search section
string searchWord="between";
if (_Index.ContainsKey(searchWord))
{
//code
}
这方面有任何想法?
你打算在散列表中添加多个键然后你想要搜索吗? –
为什么你有四个c#标签?没有关于你的问题的特定版本(甚至没有任何C#特定的),即使有我希望你添加一个指定版本的单个标签。这个问题也没有任何特定的asp.net。这真的只是.NET。 –