dotnet / dotnet/dotnet-api-docs

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

Open
#10,951 1 comment 0 reactions 0 assignees View on GitHub
area-System.Runtime untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.