mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +02:00
Allow binary search with alt key
This commit is contained in:
parent
5851653a19
commit
85279be033
2 changed files with 24 additions and 0 deletions
|
@ -689,6 +689,11 @@ namespace System.Collections
|
|||
return Array.BinarySearch(mItems, Count, item, comparer);
|
||||
}
|
||||
|
||||
public int BinarySearchAlt<TAlt>(TAlt item, delegate int(T lhs, TAlt rhs) comparer)
|
||||
{
|
||||
return Array.BinarySearchAlt(mItems, Count, item, comparer);
|
||||
}
|
||||
|
||||
public int BinarySearch(int index, int count, T item, delegate int(T lhs, T rhs) comparer)
|
||||
{
|
||||
Debug.Assert((uint)index <= (uint)mSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue