Raphe
Compare Strings like in SQL
Source
public static bool In(this string Value, params string[] ValuesToCompare)
{
bool IsIn = false;
foreach (string ValueToCompare in ValuesToCompare)
{
if (Value == ValueToCompare)
{
IsIn = true;
}
}
return IsIn;
}
Example
Console.Write("test".In("tes", "ew", "test")); // - true
Console.Write("test".In("tes", "ew")); // - false