I have always found it annoying when I need to write a condition that compares the same item over and over again since I would have the type the item so many times:
string x = textBox1.Text;
if (x == "apple" || x == "orange" || x == "banana" ...)
...
I want something like this (but of course this is not correct syntax):
if (x == "apple" || "orange" || "banana" ...)
Is there a solution other than using an array of the strings?