Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I Have a List<>. it's Mother List<> Bag It's Contain more Children's List<> inside so I need To create More Instance Based On Number of Child List<> Inside Mother List<>. Ref snap Below. I Can't Create Using Loop . Any suggestion

What I have tried:

I need Instances Like List<> (get From Loop) = new List<>();
It's dynamically Create Instance Name Based On Loop ;
Posted
Updated 16-Jun-22 5:51am
v2
Comments
Richard Deeming 16-Jun-22 4:22am    
You haven't attached a "reference snap". And you can't upload pictures here.

You could post a link to an image hosted somewhere else. But most members won't click on it.

Instead, try to provide a clear and complete description of the problem in words, including the relevant parts of your code.

1 solution

It's not very clear from your vague description exactly what you are trying to do, but it looks like you are trying to "flatten" a List of Lists into a single collection.
If so, then try this: Enumerable.SelectMany Method (System.Linq) | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900