string - C# "or" operator -
i have code:
if (textbox1.text == "one" || "two")
i have tried use || , | add more strings, says cannot applied operands of type "bool" , "string". how can make work? thank you.
or alternatively :
var strings = new list<string>() {"one", "two", "thee", .... "n"}; if(strings.contains(textbox1.text)){ }
Comments
Post a Comment