Accessing methods of an array of objects
Posted: Thu May 20, 2004 1:06 pm
I have a class, that for one of its properties has an array.
In that array I am storing a number of other objects.
I can loop through the array of objects no problem using foreach, but when I try to access a method of one of the objects it gives me a "Call to a member function on a non-object in" error.
Any ideas how I access an object that's been stored in an array?
Thanks
In that array I am storing a number of other objects.
I can loop through the array of objects no problem using foreach, but when I try to access a method of one of the objects it gives me a "Call to a member function on a non-object in" error.
Any ideas how I access an object that's been stored in an array?
Thanks