if (length < 0)
{
throw new ArgumentOutOfRangeException(nameof(length), length,
- $"Length can't be less than zero.");
+ $"length can't be less than zero.");
}
if (offset < 0)
{
throw new ArgumentOutOfRangeException(nameof(offset), offset,
- $"Offset can't be less than zero.");
+ $"offset can't be less than zero.");
}
}
{
ThrowIfBufferIsNotReadable();
+ if (source == null)
+ {
+ throw new ArgumentNullException(nameof(source));
+ }
+
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException(nameof(startIndex), startIndex,
{
ThrowIfBufferIsNotWritable();
+ if (dest == null)
+ {
+ throw new ArgumentNullException(nameof(dest));
+ }
+
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException(nameof(startIndex), startIndex,
if (startIndex + length > dest.Length)
{
throw new ArgumentOutOfRangeException($"{nameof(startIndex)}, {nameof(length)}",
- "startIndex + length can't be greater than source.Length.");
+ "startIndex + length can't be greater than dest.Length.");
}
ValidateRange(offset, length);