示例#1
0
        public bool Equals(SoldierMetaData other)
        {
            if (other == null)
            {
                return(false);
            }

            return(other.Id == this.Id && other.Name == this.Name);
        }
示例#2
0
        public override bool Equals(object other)
        {
            SoldierMetaData otherSoldierMetaData = other as SoldierMetaData;

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

            if (other == this)
            {
                return(true);
            }

            return(this.Equals(otherSoldierMetaData));
        }