Foley .NET Utilities Class Library

SetBase.Retain Method 

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

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

Parameters

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

Return Value

true if the set is modified; otherwise false.

Implements

ISet.Retain

Exceptions

Exception TypeCondition
System.NotSupportedException

The set is read-only.

-or-

The set has a fixed size.

See Also

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