Reputation: 476
I have a nested collection of collection of array that can go to any level I have to query based on a particular id and get the details of that array.
Upvotes: 2
Views: 112
Reputation: 46909
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);
Upvotes: 3