TEnumerable.Except<T> Method
Overloads
| Except<T>(IEnumerable<T>, IEnumerable<T>) |
Produces the set difference of two sequences by using the default equality comparer to compare values. |
| Except<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>) |
Produces the set difference of two sequences by using the specified equality comparer to compare values. |
Produces the set difference of two sequences by using the default equality comparer to compare values.
class function Except<T>(const first: IEnumerable<T>; const second: IEnumerable<T>): IEnumerable<T>
Type Parameters
- T
The type of the elements of the input sequences.
Parameters
- first
- IEnumerable<T>
A sequence whose elements that are not also in second will be
returned.
- second
- IEnumerable<T>
A sequence whose elements that also occur in first will cause
those elements to be removed from the returned sequence.
Returns
A sequence that contains the set difference of the elements of two sequences.
Exceptions
first or second is nil .
Produces the set difference of two sequences by using the specified equality comparer to compare values.
class function Except<T>(const first: IEnumerable<T>; const second: IEnumerable<T>; const comparer: IEqualityComparer<T>): IEnumerable<T>
Type Parameters
- T
The type of the elements of the input sequences.
Parameters
- first
- IEnumerable<T>
A sequence whose elements that are not also in second will be
returned.
- second
- IEnumerable<T>
A sequence whose elements that also occur in first will cause
those elements to be removed from the returned sequence.
- comparer
- IEqualityComparer<T>
An equality comparer to compare values.
Returns
A sequence that contains the set difference of the elements of two sequences.
Exceptions
first or second is nil .
Remarks
If comparer is nil , the default equality comparer is
used to compare values.