C# Multiple String Contains -
this question has answer here:
basically want detect more 1 string, current code example is
if (!str3.contains("example1")) { continue; }
how add " example1 ", " example2 " & " example3 "
you can use linq
if want test large list:
var excludes = new[] { "example1", "example2", "example3" }; //your loop here { if (!excludes.any(x => str3.contains(x))) { continue; } }
Comments
Post a Comment