Hi All,
I need to have fast search functionality (iterating through an array in managed code is not fast enough for my requirements) so I thought will use Arrays.Contains helper method from GHI.Utilities. However I think it doesn’t work correctly e.g.
using GHI.Utilities;
namespace ArrayContainsTest
{
public class Program
{
public static void Main()
{
var searchIn = new byte[5] {8,9,8,0,6};
var searchFor = new byte[1] {0};
var result = Arrays.Contains(searchIn, searchFor);
}
}
}
The result should have 3 instead of -1 meaning the 0 couldn’t be found.
Another option for me is to implement binary search on array in managed code(serialized objects are fixed size) but hoped this helper method will be fast enough for my needs.