internal DicomAttributeSQ(DicomAttributeSQ attrib, bool copyBinary, bool copyPrivate, bool copyUnknown)
            : base(attrib)
        {
            DicomSequenceItem[] items = (DicomSequenceItem[])attrib.Values;

            if (items != null)
            {
                _values = new DicomSequenceItem[items.Length];
                for (int i = 0; i < items.Length; i++)
                {
                    _values[i] = (DicomSequenceItem)items[i].Copy(copyBinary, copyPrivate, copyUnknown);
                }
            }
        }
        public override bool Equals(object obj)
        {
            //Check for null and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            DicomAttributeSQ a = (DicomAttributeSQ)obj;

            DicomSequenceItem[] array = (DicomSequenceItem[])a.Values;

            if (Count != a.Count)
            {
                return(false);
            }
            if (Count == 0 && a.Count == 0)
            {
                return(true);
            }
            if (IsNull && a.IsNull)
            {
                return(true);
            }

            if (_values.Length != array.Length)
            {
                return(false);
            }

            for (int i = 0; i < _values.Length; i++)
            {
                if (!array[i].Equals(_values[i]))
                {
                    return(false);
                }
            }

            return(true);
        }