From aad46c3811735ddf51aed23d93650d57a5ab0039 Mon Sep 17 00:00:00 2001 From: aw0lid Date: Tue, 18 Aug 2026 21:55:36 +0300 Subject: [PATCH] Fix StringBuilder.ToString() exception message --- .../System.Private.CoreLib/src/System/Text/StringBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs index 305795f7d2504f..32a3d7ce09a87f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs @@ -335,7 +335,7 @@ public override string ToString() // Check that we will not overrun our boundaries. if ((uint)(chunkLength + chunkOffset) > (uint)result.Length || (uint)chunkLength > (uint)sourceArray.Length) { - throw new ArgumentOutOfRangeException(nameof(chunkLength), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); + throw new ArgumentOutOfRangeException(null, SR.InvalidOperation_ConcurrentOperationsNotSupported); } Buffer.Memmove(