I want to check whether a string matches one of a list of values.
There are of course many, many ways I could go about this: if statement, switch statement, RegEx, etc. However, I would have thought that .Net would have something along the lines of
if (myString.InList("this", "that", "the other thing"))
So far the closest thing I can find would be something like:
"this; that; the other thing;".Contains(myString)
Is that pretty much the only way to go if I want to do the check in a single line and don't want to use RegEx?