IEnumerable<T>.Exclude Method

Overloads

Exclude(IEnumerable<T>)

Produces the set difference of two sequences by using the default equality comparer to compare values.

Exclude(IEnumerable<T>, IEqualityComparer<T>)

Produces the set difference of two sequences by using the specified equality comparer to compare values.

Exclude(IEnumerable<T>)

Produces the set difference of two sequences by using the default equality comparer to compare values.

Delphi
function Exclude(const second: IEnumerable<T>): IEnumerable<T>

Parameters

second
IEnumerable<T>

A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

Returns

IEnumerable<T>

A sequence that contains the set difference of the elements of two sequences.

Exceptions

second is nil .

Exclude(IEnumerable<T>, IEqualityComparer<T>)

Produces the set difference of two sequences by using the specified equality comparer to compare values.

Delphi
function Exclude(const second: IEnumerable<T>; const comparer: IEqualityComparer<T>): IEnumerable<T>

Parameters

second
IEnumerable<T>

A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

comparer
IEqualityComparer<T>

An equality comparer to compare values.

Returns

IEnumerable<T>

A sequence that contains the set difference of the elements of two sequences.

Exceptions

second is nil .