I have items from a specific source (filled out from somewhere else):
public class ItemsFromSource{ public ItemsFromSource(string name){ this.SourceName = name; Items = new List<IItem>(); } public string SourceName; public List<IItem> Items; }
Now in MyClass I have elements from several sources (filled from another place):
public class MyClass{ public MyClass(){ } public List<ItemsFromSource> BunchOfItems; }
Is there an easy way to iterate over all the elements in all the ItemsFromSources elements in BunchOfItems at a time? i.e. something like:
foreach(IItem i in BunchOfItems.AllItems()){
instead of doing
foreach(ItemsFromSource ifs in BunchOffItems){ foreach(IItem i in ifs){
list c # functional-programming silverlight
eriksmith200
source share