All C# extension methods for type icollection-t
-
RemoveAll()
ICollection interface has List type most of time, so this Extension allows to call RemoveAll() method with the same signature like on List
-
Remove
Removes items from a list based on a condition you provide. I have a feeling this should exist already but I can't find it. You can get the same results using 'where' but this method operates on the collection itself.
-
RemoveDuplicates
Removes items from a collection based on the condition you provide. This is useful if a query gives you some duplicates that you can't seem to get rid of. Some Linq2Sql queries are an example of this. Use this method afterward to strip things you know are in the list multiple times
-
UpdateCollection
Updates items from the collection using a modified version of this collection. Useful in MVVM scenarios needing cancellable edition and delayed persistence.