Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linq: Parent/Child question

Status
Not open for further replies.

MarkGreen

Technical User
Oct 4, 2002
40
GB
Hi

I have some data which is set up as follows; I have a collection of Parent objects which each contains a collection of child objects.

I'm trying to obtain a list of all child objects which appear in every parent.

The only way that I can think of doing this is to loop through each parent (using e.g foreach) and intersect the child objects on a parent-by-parent basis.

Does anyone know if there is an easier/nicer way to do this using linq?

Thanks
 
linq would do the same thing, the syntax is different that's all.

Jason Meckley
Senior Programmer

faq855-7190
faq732-7259
My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top