Example #1
0
        /// <summary>
        /// Determines whether the values of this <see cref="DicomElementBinaryData{T}"/> are equal to the values of the other instance.
        /// </summary>
        /// <param name="other">The other <see cref="DicomElementBinaryData{T}"/> with which to compare.</param>
        /// <returns>True if the two instances have the same number of values and the values are equal pairwise; False otherwise.</returns>
        public bool CompareValues(DicomElementBinaryData <T> other)
        {
            var count = Count;

            if (count != other.Count)
            {
                return(false);
            }

            for (var n = 0; n < count; ++n)
            {
                if (!Equals(GetValue(n), other.GetValue(n)))
                {
                    return(false);
                }
            }
            return(true);
        }