diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs index 2b68ffaad23c15..2cf4ddc028c496 100644 --- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs +++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs @@ -132,7 +132,7 @@ internal Memory GetMemory(int sizeHint) if (sizeHint < 0) { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize); + ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint); } AllocateWriteHeadIfNeeded(sizeHint); @@ -149,7 +149,7 @@ internal Span GetSpan(int sizeHint) if (sizeHint < 0) { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize); + ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint); } AllocateWriteHeadIfNeeded(sizeHint);