Basically I want to detect more than one string, current code example is
if (!str3.Contains("example1"))
{
continue;
}
How would I add " example1 ", " example2 " & " example3 "
You can use Linq if you want to test with a large list:
var excludes = new[] { "example1", "example2", "example3" };
//your loop here
{
if (!excludes.Any(x => str3.Contains(x)))
{
continue;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With