Пример #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="DicomElementBinaryData{T}"/> filled with zero values.
 /// </summary>
 /// <param name="count">Number of initial values.</param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="count"/> is negative.</exception>
 public DicomElementBinaryData(int count)
 {
     if (count < 0)
     {
         throw new ArgumentOutOfRangeException("count");
     }
     if (count * _sizeOfT <= _thresholdBytes)
     {
         _array = new T[count];
     }
     else
     {
         _stream = new LargeMemoryStream();
         _stream.SetLength(count * _sizeOfT);
     }
 }