dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

`System.String.Remove` doesn't mention a change introduced in .NET 6.0.

Open Dersei opened this issue 11 months ago • 1 comments

Type of issue

Missing information

Description

In .NET 6.0 System.String.Remove was updated (dotnet/runtime#50094) to support values of startIndex equal to the length of the string. Before both methods would throw an exception in such cases, currently they both simply return this.

The article not only doesn't mention that change but implies in Remarks that the old behaviour is still true.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.string.remove?view=net-9.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/String.xml

Document Version Independent Id

bf50904f-f0ff-1d7f-b23e-6ad2e08930ce

Article author

@dotnet-bot

Dersei avatar Feb 12 '25 20:02 Dersei

Tagging subscribers to this area: @dotnet/area-system-runtime