Array.FindIndex has incorrect ArgumentOutOfRangeException description for 'startIndex' parameter. #9719
Labels
area-System.Runtime
Pri3
Indicates issues/PRs that are low priority
untriaged
New issue has not been triaged by the area owner
Uh oh!
There was an error while loading. Please reload this page.
Example of what it looks like today (see bottom line of documentation):
It effectively says that the method accepts [0 <= startIndex < Length] with Length exclusive.
But what the method actually accepts is [0 <= startIndex <= Length] with Length inclusive.
The real behavior of the startIndex is identical to String.Substring, which has the following description instead:
To be correct and easy to understand the FindIndex documentation should thus say:
// startIndex is less than zero or greater than the length of the array.
The text was updated successfully, but these errors were encountered: