public bool Equals(User other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(UserId, other.UserId); }
public int CompareTo(User other) { return UserId.CompareTo(other.UserId); }