1、如何使用List<T>.Any来代List<T>.Contains(TSource value, IEqualityComparer<TSource> comparer),不需要使用IEqualityComparer比较器
List<string> list = new List<string>() { "Tom", "Dick", "Harry", "Mary", "Jay" };
Response.Write(list.Any(s => s.ToLower() == "tom"));
Response.Write(list.Any(s => s.ToLower() == "tom"));
2、