Skip to content

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

Open
@Dersei

Description

@Dersei

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions