Skip to content

Commit d5bda76

Browse files
Fix the return value of the span overload of Encoding.GetChars
This method returns the number of returned chars, not the number of decoded bytes.
1 parent d617861 commit d5bda76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Text/Encoding.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3128,7 +3128,7 @@ On .NET Core, the <xref:System.Text.Encoding.Default%2A> property always returns
31283128
<param name="bytes">A read-only span containing the sequence of bytes to decode.</param>
31293129
<param name="chars">The character span receiving the decoded bytes.</param>
31303130
<summary>When overridden in a derived class, decodes all the bytes in the specified read-only byte span into a character span.</summary>
3131-
<returns>The number of decoded bytes.</returns>
3131+
<returns>The actual number of characters written at the span indicated by the <paramref name="chars" /> parameter.</returns>
31323132
<remarks>
31333133
<format type="text/markdown"><![CDATA[
31343134

0 commit comments

Comments
 (0)