Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect ExceptionArgument.length for ArgumentOutOfRangeException in MemoryMarshal #105475

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public static unsafe T Read<T>(ReadOnlySpan<byte> source)
}
if (sizeof(T) > source.Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
ThrowHelper.ThrowArgumentOutOfRangeException();
}
return Unsafe.ReadUnaligned<T>(ref GetReference(source));
}
Expand Down Expand Up @@ -513,7 +513,7 @@ public static unsafe void Write<T>(Span<byte> destination, in T value)
}
if ((uint)sizeof(T) > (uint)destination.Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
ThrowHelper.ThrowArgumentOutOfRangeException();
}
Unsafe.WriteUnaligned(ref GetReference(destination), value);
}
Expand Down Expand Up @@ -555,7 +555,7 @@ public static unsafe ref T AsRef<T>(Span<byte> span)
}
if (sizeof(T) > (uint)span.Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
ThrowHelper.ThrowArgumentOutOfRangeException();
}
return ref Unsafe.As<byte, T>(ref GetReference(span));
}
Expand All @@ -577,7 +577,7 @@ public static unsafe ref readonly T AsRef<T>(ReadOnlySpan<byte> span)
}
if (sizeof(T) > (uint)span.Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
ThrowHelper.ThrowArgumentOutOfRangeException();
}
return ref Unsafe.As<byte, T>(ref GetReference(span));
}
Expand Down
Loading