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

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members