As of GetChildrenRecursive()
it seems to work, but looks rather complicated as a BFS algorithm to be. Remember that you have private access to the properties and fields of Node
instances, so you can for instance call Children
on any Node
not just this
. Below is a revised version, that is a little easier to follow: