Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Removing items from a nested ICollection

$
0
0

Hi,

Given the following classes

public class A { string Id { get; set;} ICollection<B> MyColB { get; set; } } public class B { string Id { get; set } }

List<A> MyColA;

Assuming that MyColA has been populated with several items. How do I find and remove a B item with a specific Id from all A elements in MyColA.

Regards

Alan


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>