output.Text=b_code.BinarySearch(list[0].ToString());
It would seem to me that b_code actually does contain the string list[0]
because a .Contains statement returns true. The index should be 1 and the
array contains about 675 elements. Instead, the binary search returns
"-607" Any idea why it might do that? Does using .Add in an ArrayList
create the array with negative indexes somehow? I'm just really confused as
to why it would return a negative index for something that it knows exists.
Any help would be appreciated.
~Ben