Пример #1
0
        public static int Compare(IntPair a, IntPair b) {
            if (a < b)
                return 1;
            if (a == b)
                return 0;

            return -1;
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            IntPair other = obj as IntPair;

            if (other == null)
            {
                return(false);
            }

            return(x == other.x && y == other.y);
        }
Пример #3
0
        public static int Compare(IntPair a, IntPair b)
        {
            if (a < b)
            {
                return(1);
            }
            if (a == b)
            {
                return(0);
            }

            return(-1);
        }