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

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

            ivarsEqual = base.Equals(rhs);

            if (!(_orginatingEntityID.Equals(rhs._orginatingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_recevingEntityID.Equals(rhs._recevingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_requestID == rhs._requestID))
            {
                ivarsEqual = false;
            }
            if (!(_requiredReliabilityService == rhs._requiredReliabilityService))
            {
                ivarsEqual = false;
            }
            if (!(_tranferType == rhs._tranferType))
            {
                ivarsEqual = false;
            }
            if (!(_transferEntityID.Equals(rhs._transferEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfRecordSets == rhs._numberOfRecordSets))
            {
                ivarsEqual = false;
            }

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


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

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

            ivarsEqual = base.Equals(rhs);

            if( ! (_orginatingEntityID.Equals( rhs._orginatingEntityID) )) ivarsEqual = false;
            if( ! (_recevingEntityID.Equals( rhs._recevingEntityID) )) ivarsEqual = false;
            if( ! (_requestID == rhs._requestID)) ivarsEqual = false;
            if( ! (_requiredReliabilityService == rhs._requiredReliabilityService)) ivarsEqual = false;
            if( ! (_tranferType == rhs._tranferType)) ivarsEqual = false;
            if( ! (_transferEntityID.Equals( rhs._transferEntityID) )) ivarsEqual = false;
            if( ! (_numberOfRecordSets == rhs._numberOfRecordSets)) ivarsEqual = false;

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

            return ivarsEqual;
        }