Example #1
0
        public int CompareTo(object obj)
        {
            if (this == obj)
            {
                return(0);
            }

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

            SetInterfaceImplTwo that = (SetInterfaceImplTwo)obj;

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

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

            SetInterfaceImplTwo that = (SetInterfaceImplTwo)o;

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

            return(true);
        }