Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
        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");
            }
        }