Esempio n. 1
0
        public int CompareTo(object obj)
        {
            if (this == obj)
            {
                return(0);
            }

            if (obj == null || !(obj is SetInterfaceImplOne))
            {
                return(-1);
            }

            SetInterfaceImplOne that = (SetInterfaceImplOne)obj;

            return(magicNumber.CompareTo(that.magicNumber));
        }
Esempio n. 2
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }

            if (o == null || !(o is SetInterfaceImplOne))
            {
                return(false);
            }

            SetInterfaceImplOne that = (SetInterfaceImplOne)o;

            if (magicNumber != that.magicNumber)
            {
                return(false);
            }

            return(true);
        }