EqualsAny
Check that the given string is in a list of potential matches. Inspired by StackOverflow answer http://stackoverflow.com/a/20644611/23199
Source
public static bool EqualsAny(this string str, params string[] args)
{
return args.Any(x=>
StringComparer.InvariantCultureIgnoreCase.Equals(x, str));
}
Example
string custName = "foo";
bool isMatch = (custName.EqualsAny("bar", "baz", "FOO")); //true