Trouble accessing ArrayList with index
Posted on 2006-06-02
I have an ArrayList populated from a DataReader:
object values = new object[dr.FieldCount];
then I try to access it like this:
however I can't even get the thing to compile. I get this error:
"Cannot apply indexing with  to an expression of type 'object'"
I have tried casting it every way I could think of without success. If comment out the part where I try to access it, and then run the program, and then put it in break mode right next to where I am trying to access it, I am able to get what I need in the command window using the exact same line: EndSegData[x][y]. So, it works in the command window but not in the program.
I could use some help getting it to work in my program.