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

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -