bool b = listOfStrings.Any(s=>myString.Contains(s));
应用在where子句中的示例:
//获取路径 var groupPaths = groups.Select(x => x.GroupPath).ToList(); //获取所有子分组 var childrenGroups = allStoreGroups.Where(x => groupPaths.Any(t => x.GroupPath.Contains(t))).ToList();