コード例 #1
0
ファイル: GridAxis.cs プロジェクト: sab193/open-dis-csharp
        /// <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(GridAxis obj)
        {
            bool ivarsEqual = true;

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

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

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

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

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

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

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

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

            return(ivarsEqual);
        }
コード例 #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(GridAxis obj)
        {
            bool ivarsEqual = true;

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

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

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

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

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

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

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

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

            return ivarsEqual;
        }