public class user_collection_DistinctBy_userId : IEqualityComparer<User> { public bool Equals(User x, User y) { if (x.UserId == y.UserId) { return true; } else { return false; } } public int GetHashCode(User obj) { return 0; } }
时间: 2024-11-08 21:38:21