Home
|
Articles
|
Tutorials
|
Namespace
|
Interview Questions
|
Tools
|
Jobs
|
Projects
|
Community
»Dotnet Ads
»Message Boards
Message Boards
Dotnet Books
»Member Details
Register
Login
LogOut
Submit Code
Submit Jobs
Submit Projects
»Competition
Community
Winners
Prizes
Write For Us
Members
»Other Resources
Links
Dotnet Resources
Forums
»
Introduce Yourself!!!»
Hashtable Issue
Hi I'm new to C# This code allows for the word summary to be picked up from a combobox and the relevant XML documentation to be placed into a textbox. I can get this to work of I hard code a name eg Summary but cannot get the code to work if I want to ask if it "contains" a certain word.Can you help? private void listBox7_SelectedIndexChanged(object sender, EventArgs e) { result = listBox7.Items[listBox7.SelectedIndex] as DocMember; //Clear the text box of information. textBox2.Clear(); if (comboBox2.Text != "") { if (comboBox2.Text == "summary") // if(result.TagValues.Keys Contains (comboBox2.Text)) //if (comboBox2.Text Contains result.TagValues.Keys) //if (result.TagValues.Keys Contains comboBox2.Text) //if (result.TagValues.Keys) Contains comboBox2.Text //if ((result.TagValues.Keys) Contains (comboBox2.Text)) { string TagDetails = comboBox2.Text; textBox2.Text = result.TagValues[comboBox2.Text].ToString(); } else { MessageBox.Show("There are No TAGS present", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
© 2005 dotnetwatch.com --
Privacy policy