コード例 #1
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(RadioCommunicationsFamilyPdu rhs)
        {
            bool ivarsEqual = true;

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

            if (!(_entityId.Equals(rhs._entityId)))
            {
                ivarsEqual = false;
            }
            if (!(_radioId == rhs._radioId))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
コード例 #2
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(RadioCommunicationsFamilyPdu rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
                return false;

            ivarsEqual = base.Equals(rhs);

            if( ! (_entityId.Equals( rhs._entityId) )) ivarsEqual = false;
            if( ! (_radioId == rhs._radioId)) ivarsEqual = false;

            return ivarsEqual;
        }