your missing an amperstand (&) (is this a typo?)
if (rt1 == null & rt2 == null) // oops!
if (rt1 == null && rt2 == null) // like this....
Muad'Dib
2009-10-20 19:27:35
your missing an amperstand (&) (is this a typo?)
if (rt1 == null & rt2 == null) // oops!
if (rt1 == null && rt2 == null) // like this....
Sometimes a sort algorithm will end up comparing an object to itself. When this happened, it triggered the code:
if (rt1 == null)
return -1;
It was this that caused the error. You've got to be sure that you have all cases covered.
And if those x,y values represent points, you might want to check this article on sorting them: http://www.c-sharpcorner.com/UploadFile/mgold/SortedDictionarySample06202007142815PM/SortedDictionarySample.aspx