Here's how my code works:
Now, the problem is that I need to return the array from myClass to myMainClass "on-the-fly", that is, even if the array is not completely filed, it already has to return its first values.
Note: I use a list at first (and eventually convert it to an array) because of its dynamic size property.
Well It seems you just want a reference to the array in your main class. Just have the array as a public class level variable in your sub class and call the ref. But beware if the array is not instantiated it will throw an exception. Or another function or getter.
answered Apr 13 '12 at 11:26 AM