I have a ListCollectionView
which has had a filter applied to it. In order to get the filtered items from the list (e.g. to write to a file), is there a clean way of doing it.
My current solution is
var filteredItems = originalCollection.Where(i => view.Filter(i));
In the code I do check for nulls on originalCollection
and view.Filter
.
Is there a cleaner way of doing this?