Answer the question
In order to leave comments, you need to log in
How to get all objects of another object?
I have an object in which there are others, they all have their own structure, but the common variable is Num, so I need to assign them to each Num.
ObjectCellStatic <-- empty object
--ObjectBase <-- object with class ObjectBase
--ObjectBase
--ObjectCreate <-- object with class ObjectCreate
ObjectCellDynamic <-- empty object
--ObjectMoveBase
--ObjectMoveCreate
Answer the question
In order to leave comments, you need to log in
you can inherit all of them from one class, and for the time of enumeration, bring the elements to the base class that has a stupid num field, so to speak, use boxing. The same can be done through interfaces
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question