May 29, 2009 01:00 PM|abinashpatra|LINK
When your array does not have the 9th element you cannot check arr.Tostring() will not work as the 10th (Remember start index is 0) will through index out of range.
I would ssuggest you to take a count of array first and then if the count is greater than 9 then access arr.
BTW, Just check your code once again. You have a problem with the 10th element. The problem can happen with any element.If your array is having 2 elements then it will throw exception at arr itself.