I have a class like:
class Spline
int ChildrenCount;
Spline GetChild (int index)
class SplineCollection : IEnumerable<Spline>
Spline Master
Is it possible to write a recursive IEnumerable for the SplineCollection where it will return all the children one by one?
EDIT: So Master is the root Box, and the hierarchy of its children can be any depth.
EDIT: By using the name Box, I think I confused some people. It's meant to be a geometric object, not a container. So changing it to Spline.