/**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(ActionRequestReliablePdu rhs)
        {
            bool ivarsEqual = true;

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

            if (!(_requiredReliabilityService == rhs._requiredReliabilityService))
            {
                ivarsEqual = false;
            }
            if (!(_pad1 == rhs._pad1))
            {
                ivarsEqual = false;
            }
            if (!(_pad2 == rhs._pad2))
            {
                ivarsEqual = false;
            }
            if (!(_requestID == rhs._requestID))
            {
                ivarsEqual = false;
            }
            if (!(_actionID == rhs._actionID))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
            {
                FixedDatum x = (FixedDatum)_fixedDatumRecords[idx];
                if (!(_fixedDatumRecords[idx].Equals(rhs._fixedDatumRecords[idx])))
                {
                    ivarsEqual = false;
                }
            }


            for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
            {
                VariableDatum x = (VariableDatum)_variableDatumRecords[idx];
                if (!(_variableDatumRecords[idx].Equals(rhs._variableDatumRecords[idx])))
                {
                    ivarsEqual = false;
                }
            }


            return(ivarsEqual);
        }
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(ActionRequestReliablePdu rhs)
        {
            bool ivarsEqual = true;

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

            ivarsEqual = base.Equals(rhs);

            if( ! (_requiredReliabilityService == rhs._requiredReliabilityService)) ivarsEqual = false;
            if( ! (_pad1 == rhs._pad1)) ivarsEqual = false;
            if( ! (_pad2 == rhs._pad2)) ivarsEqual = false;
            if( ! (_requestID == rhs._requestID)) ivarsEqual = false;
            if( ! (_actionID == rhs._actionID)) ivarsEqual = false;
            if( ! (_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords)) ivarsEqual = false;
            if( ! (_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords)) ivarsEqual = false;

            if( ! (_fixedDatumRecords.Count == rhs._fixedDatumRecords.Count)) ivarsEqual = false;
            if(ivarsEqual)
            {
                for(int idx = 0; idx < _fixedDatumRecords.Count; idx++)
                {
                    if( ! ( _fixedDatumRecords[idx].Equals(rhs._fixedDatumRecords[idx]))) ivarsEqual = false;
                }
            }

            if( ! (_variableDatumRecords.Count == rhs._variableDatumRecords.Count)) ivarsEqual = false;
            if(ivarsEqual)
            {
                for(int idx = 0; idx < _variableDatumRecords.Count; idx++)
                {
                    if( ! ( _variableDatumRecords[idx].Equals(rhs._variableDatumRecords[idx]))) ivarsEqual = false;
                }
            }

            return ivarsEqual;
        }