-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Type of issue
Other (describe below)
Description
In the String.Remove method which takes only a startIndex parameter, you may pass a startIndex equal to the length of the string and the string returned is the same as the string passed in. This contradicts the remarks in the documentation:
The value of the startIndex parameter can range from zero to one less than the length of the string instance."
The documentation states that an ArgumentOutOfRangeException is thrown if "startIndex specifies a position that is not within this string." However, this does not happen.
Page URL
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
Platform Id
c27a4a36-d9f6-1645-1e78-92b328516d7b