Open this page in the API Guide

Enumerable.except Method

Produces the set difference of two sequences, optionally using the specified equality comparer to compare values.
 
 
Static This method is static.

Parameters

first

Type: IEnumerable
An enumerable whose elements that are not also in the second will be returned.
second

Type: IEnumerable
An enumerable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.
equalityComparer

Type: IEqualityComparer
An equality comparer to compare values.
Optional: True

Return Value


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