IEnumerable<T>.Intersect Method
Overloads
| Intersect(IEnumerable<T>) |
Produces the set intersection of two sequences by using the default equality comparer to compare values. |
| Intersect(IEnumerable<T>, IEqualityComparer<T>) |
Produces the set intersection of two sequences by using the specified equality comparer to compare values. |
Produces the set intersection of two sequences by using the default equality comparer to compare values.
function Intersect(const second: IEnumerable<T>): IEnumerable<T>
Parameters
- second
- IEnumerable<T>
A sequence whose distinct elements that also appear in the first sequence will be returned.
Returns
A sequence that contains the elements that form the set intersection of two sequences.
Exceptions
second is nil .
Produces the set intersection of two sequences by using the specified equality comparer to compare values.
function Intersect(const second: IEnumerable<T>; const comparer: IEqualityComparer<T>): IEnumerable<T>
Parameters
- second
- IEnumerable<T>
A sequence whose distinct elements that also appear in the first sequence will be returned.
- comparer
- IEqualityComparer<T>
An equality comparer to compare values.
Returns
A sequence that contains the elements that form the set intersection of two sequences.
Exceptions
second is nil .