Esempio n. 1
0
        public int CompareTo(object obj)
        {
            ComparablePair <S, T> op = obj as ComparablePair <S, T>;

            if (op == null)
            {
                return(-1);
            }

            var k = Item1.CompareTo(op.Item1);

            if (k != 0)
            {
                return(k);
            }
            else
            {
                return(Item2.CompareTo(op.Item2));
            }
        }
Esempio n. 2
0
        public int CompareTo(object obj)
        {
            ComparablePair <S, T> op = obj as ComparablePair <S, T>;

            if (op == null)
            {
                return(-1);
            }

            var k = First.CompareTo(op.First);

            if (k != 0)
            {
                return(k);
            }
            else
            {
                return(Second.CompareTo(op.Second));
            }
        }