开发者

Querying a collection of collection using Linq

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 detai开发者_运维问答ls of that array.


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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜