Foley .NET Utilities Class Library

IList2.Retain Method 

When implemented by a class, retains the first occurrence of each element of the specified ICollection from the list.

[Visual Basic]
Function Retain( _
   ByVal collection As ICollection _
) As Boolean
[C#]
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.

Exceptions

Exception TypeCondition
System.NotSupportedException

The list is read-only.

-or-

The list has a fixed size.

See Also

IList2 Interface | IList2 Members | Foley.Utilities.Collections Namespace