public int CompareTo(Shark other) { if (other == null) { return(1); } if (MaxNumberOfVictims != other.MaxNumberOfVictims) { return(MaxNumberOfVictims.CompareTo(other.MaxNumberOfVictims)); } if (HoursNeededToSleep != other.HoursNeededToSleep) { return(HoursNeededToSleep.CompareTo(other.HoursNeededToSleep)); } if (Weight != other.Weight) { return(Weight.CompareTo(other.Weight)); } if (BodyPattern != other.BodyPattern) { return(BodyPattern.Name.CompareTo(other.BodyPattern.Name)); } return(0); }
public override int GetHashCode() { return(MaxNumberOfVictims.GetHashCode()); }