1
0
Fork 0
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:
Brian Fiete 2020-06-21 07:51:21 -07:00
parent 5851653a19
commit 85279be033
2 changed files with 24 additions and 0 deletions

View file

@ -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);