Does anyone know why this snippet of code continues to return x with a value
of -1?
Is there an issue with ArrayList.BinarySearch?
ArrayList myAL = new ArrayList();
myAL .Add(1);
myAL .Add(2);
myAL .Add(3);
object oX;
oX = 3;
int x = myAL .BinarySearch(oX)
According to the documentation, x should = 2. Being the index of where the
value 3 exists in myAl.
Regards
Pete