H
Homa
I can' believe my own eye, but it happens...there is a bug in
ArrayList.BinarySearch!! It should be such a simple function......
Here is the detail. (I'm using C#, don't know if this is C#'s problem
or the whole framework's problem.
ArrayList test = new ArrayList();
test.Add(10);
test.Add(7);
test.Add(2);
test.BinarySearch(10);
the Search would return -4 instead of 0!! When you debug it, you see
in the variable test is normal:
test[0] = 10, test[1] = 7, test[2] = 2.
Who wrote this function..........
Homa Wong
ArrayList.BinarySearch!! It should be such a simple function......
Here is the detail. (I'm using C#, don't know if this is C#'s problem
or the whole framework's problem.
ArrayList test = new ArrayList();
test.Add(10);
test.Add(7);
test.Add(2);
test.BinarySearch(10);
the Search would return -4 instead of 0!! When you debug it, you see
in the variable test is normal:
test[0] = 10, test[1] = 7, test[2] = 2.
Who wrote this function..........
Homa Wong