public override int GetHashCode() { unchecked { var result = NorthLatitude.GetHashCode(); result = (result * 397) ^ WestLongitude.GetHashCode(); result = (result * 397) ^ SouthLatitude.GetHashCode(); result = (result * 397) ^ EastLongitude.GetHashCode(); return(result); } }
public int CompareTo(object obj) { if (obj == null) { return(1); } BoundingBox otherBox = obj as BoundingBox; if (otherBox != null) { var comparer = SouthLatitude.CompareTo(otherBox.SouthLatitude); if (comparer == 0) { comparer = WestLongitude.CompareTo(otherBox.WestLongitude); } return(comparer); } else { throw new ArgumentException("Object is not a BoundingBox"); } }