dotnet / dotnet/dotnet-api-docs
What if a binary search is going to be performed in an empty array?
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The function returns `-1`. Shouldn't it be specifically mentioned? It is quite important in my opinion.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 23a54b61-3aff-2dfd-9520-190191a516e4
* Version Independent ID: b3e84250-d3e4-8716-f4a5-659ee75f5f77
* Content: [Array.BinarySearch Method (System)](https://docs.microsoft.com/en-us/dotnet/api/system.array.binarysearch?view=netframework-4.7.2#System_Array_BinarySearch_System_Array_System_Int32_System_Int32_System_Object_System_Collections_IComparer_)
* Content Source: [xml/System/Array.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/Array.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.