Ejemplo n.º 1
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(BurstDescriptor obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            if (!this._munition.Equals(obj._munition))
            {
                ivarsEqual = false;
            }

            if (this._warhead != obj._warhead)
            {
                ivarsEqual = false;
            }

            if (this._fuse != obj._fuse)
            {
                ivarsEqual = false;
            }

            if (this._quantity != obj._quantity)
            {
                ivarsEqual = false;
            }

            if (this._rate != obj._rate)
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(BurstDescriptor obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return false;
            }

            if (!this._munition.Equals(obj._munition))
            {
                ivarsEqual = false;
            }

            if (this._warhead != obj._warhead)
            {
                ivarsEqual = false;
            }

            if (this._fuse != obj._fuse)
            {
                ivarsEqual = false;
            }

            if (this._quantity != obj._quantity)
            {
                ivarsEqual = false;
            }

            if (this._rate != obj._rate)
            {
                ivarsEqual = false;
            }

            return ivarsEqual;
        }