score:3

Accepted answer

Sounds like you need a recursive function. I wrote an extension method to IEnumerable called SelectRecursive on codeproject a while ago: http://www.codeproject.com/Tips/80746/Select-Recursive-Extension-method

Usage: var allChildren = node.ChildNodes.SelectRecursive(n => n.ChildNodes);


Related Articles