select any element in a set that contains any element in another set using LINQ

  • Thread starter Thread starter essamce
  • Start date Start date
E

essamce

Guest
i have

string[] chunks = { "c1","c2","c3","c4", };
List<string> names = new List<string>() { "aaaac1", "c1bbbb", "dddd", "c4", "cccc"};


i want to get any elements of names that contains any element in chunks using LINQ

in the above case the result should be


"aaaac1"

"c1bbbb"

"c4"

using LINQ

Continue reading...
 
Back
Top