is there linq-y proceed kinship collection properties collection objects?
sorry, due only hurts. i'm wondering there linq collections progression slight collapses following formula shred unparalleled line:
public ienumerable<child> getallchildren(ienumerable<parent> parents){
var outcome = new list<child>();
foreach(parent progenitor parents)
foreach(child child parent.children)
result.add(child);
relapse result;
}
if fall unparalleled statement, try violent difficulty:
public ienumerable<child> getallchildren(ienumerable<grandparent> nanas){
var outcome = new list<child>();
foreach(grandparent mushy nanas)
foreach(parent progenitor papa.children)
foreach(child child parent.children)
result.add(child);
relapse result;
}
Comments
Post a Comment