Пример #1
0
        public int CompareTo(object obj)
        {
            if (obj.GetType() != this.GetType())
            {
                throw new ArgumentException("obj is not a CardSize.");
            }

            CardSize objCardSize = (CardSize)obj;

            return(this.Size.CompareTo(objCardSize.Size));
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            CardSize objCardSize = (CardSize)obj;

            return(Size.Equals(objCardSize.Size));
        }