R
Russell
Can you have a structure that contains a collection of objects created by a
class?
Example:
Structure - Bag of Marbles: BagOfMarbles.Count(),
BagOfMarbles.Marble(1).Color, etc.
Class - Marble: Marble().Color, Marble().Description
Now the twist -
I want BagOfMarbles.CountOfBlueMarbles()
Now the structure will need to access all objects of Marble, check the
color and see if it is blue, if so then count++.
The BagOfMarbles is not an object. I will never have 2 bags of marbles.
It will be a container that allows me to access to individual marbles and
the ability to compare marble(1) versus marble(2), plus the ability to sort
marbles.
I will control access to the marbles through the marble structure. One note,
I may not need marbles to be an class. Marbles will not change color in the
bag. All the properties of Marbles will be static and loaded at run time via
a datasource.
Thanks.
class?
Example:
Structure - Bag of Marbles: BagOfMarbles.Count(),
BagOfMarbles.Marble(1).Color, etc.
Class - Marble: Marble().Color, Marble().Description
Now the twist -
I want BagOfMarbles.CountOfBlueMarbles()
Now the structure will need to access all objects of Marble, check the
color and see if it is blue, if so then count++.
The BagOfMarbles is not an object. I will never have 2 bags of marbles.
It will be a container that allows me to access to individual marbles and
the ability to compare marble(1) versus marble(2), plus the ability to sort
marbles.
I will control access to the marbles through the marble structure. One note,
I may not need marbles to be an class. Marbles will not change color in the
bag. All the properties of Marbles will be static and loaded at run time via
a datasource.
Thanks.