public int CompareTo(LeagueTableItemViewModel other) { if (Points != other.Points) { return(-Points.CompareTo(other.Points)); } if (GoalDifference != other.GoalDifference) { return(-GoalDifference.CompareTo(other.GoalDifference)); } if (Scored != other.Scored) { return(-Scored.CompareTo(other.Scored)); } return(TeamViewModel.ToString().CompareTo(other.TeamViewModel.ToString())); }
public override int GetHashCode() { return(Points.GetHashCode() ^ GoalsFor.GetHashCode() ^ GoalDifference.GetHashCode()); }