Foley .NET Utilities Class Library

List2Base.Retain Method 

Retains the first occurrence of each element of the specified ICollection from the list.

[Visual Basic]
Overridable Public Function Retain( _
   ByVal collection As ICollection _
) As Boolean Implements _
   IList2.Retain
[C#]
public virtual bool Retain(
   ICollection collection
);

Parameters

collection
The ICollection used to determine what elements to be retained in the list.

Return Value

true if the list is modified; otherwise false.

Implements

IList2.Retain

Exceptions

Exception TypeCondition
System.NotSupportedException

The list is read-only.

-or-

The list has a fixed size.

See Also

List2Base Class | List2Base Members | Foley.Utilities.Collections Namespace