110,567
社区成员
发帖
与我相关
我的任务
分享
bool result = !list2.Any(str1 => str1.ToUpper().Any(char1 => list1.All(str2 => str2.ToUpper().All(char2 => char1 != char2))))
public class StrCompare : IEqualityComparer<string>
{
public bool Equals(string x, string y)
{
if (y.Contains(x))
return true;
return false;
}
public int GetHashCode(string obj)
{
return 1;
}
}
A1.Intersect(A2, new StrCompare()); 最终还是要使用Contains判断。