Hi Guys,
I have a problem with selecting several item from a combobox which are suppose to call same method. let's say I have a combobox populated like this list
One
Two
Three
Four
Five
Six
Now I would like to let if user select one of these three option "One","Two","Five" from the list the ThisMethod(); has been called and so on. But as you know we can not pass more than one item trough Equals().
if (comblist.SelectedItem.ToString().Equals("One","Two","Five"))
{
//Do ThisMethod();
}
else{
//Do ThatMethod();
I also tried to create an array like
private string[] sserver = {"One","Two","Five"};
if (comblist.SelectedItem.ToString().Equals(sserver.ToString()))
{
//Do ThisMethod();
}
else{
//Do ThatMethod();
But this one didn't go trough, neither.
Can you please let me know how I can fix it?
Thanks for your time