|
ListExtensionsRemoveWhereT Method
|
Iterates through each item in the list. Allowing items to be removed from the list.
Namespace: GSF.CollectionsAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax public static int RemoveWhere<T>(
this List<T> list,
Func<T, bool> shouldRemove
)
JavaScript does not support generic types or methods.
View SourceParameters
- list ListT
- the list to iterate though
- shouldRemove FuncT, Boolean
- the function to call to determine
if the items should be removed from the list.
Type Parameters
- T
Return Value
Int32
The number of items removed from the list.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
In order to minimize the overhead of a removal. Any item removed with be replaced with
the last item in the list. Therefore Sequence will not be preserved using this method.
See Also