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

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -