<PackageReference Include="System.Memory" Version="4.5.4" />

System.ThrowHelper

static class ThrowHelper
namespace System { internal static class ThrowHelper { public static bool TryFormatThrowFormatException(out int bytesWritten); public static bool TryParseThrowFormatException<T>(out T value, out int bytesConsumed); public static void ThrowArgumentValidationException<T>(ReadOnlySequenceSegment<T> startSegment, int startIndex, ReadOnlySequenceSegment<T> endSegment); public static void ThrowArgumentValidationException(Array array, int start); public static void ThrowStartOrEndArgumentValidationException(long start); } }