示例#1
0
        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()));
        }
示例#2
0
 public override int GetHashCode()
 {
     return(Points.GetHashCode()
            ^ GoalsFor.GetHashCode()
            ^ GoalDifference.GetHashCode());
 }