I have a class (A) that contains an array of instances of another class (B).
A third class C has a "pointer" (i.e. a reference variable) to class A.
In class C, I want to get a pointer to one of the class B instances in the array.
However, I cannot make the array public in class A, because VB
does not allow public arrays in a class.
If I write a "get" function in class A, I want that function to return a reference to the array item (class B instance), NOT the value of it. This is so that I can subsequently call the methods of that class B instance, from within class C.
So - how do I return a reference to class B, from the "get" function?
Or... is there a much better approach to this?