I wanted to created a code that would find which items are selected in both the listboxes,compare both the items and according to that show some text by clicking on a button.I've tried the following code but it is not working:-
string curItem = listBox1.SelectedItem.ToString();
string curItem2 = listBox2.SelectedItem.ToString();
if ((curItem == listBox1.Items[0].ToString()) && (curItem2 == listBox2.Items[3].ToString()))
{
textBlock4.Text = "ok";
}
It shows the output for any combination of listbox items.I wanted different output for different combination.
Please help me.

New Topic/Question
Reply




MultiQuote





|