EnumerableUtility.Except<T> method (1 of 2)

Makes distinct and then removes a single item from a sequence.

public static IEnumerable<T> Except<T>(this IEnumerable<T> source, T item)
parameter description
source A sequence whose elements not matching the specified item will be returned.
item An item that will not occur in the resulting sequence.

Return Value

A sequence consisting of every distinct item in the specified sequence that does not match the specified item according to the provided (or default if not provided) equality comparer.

See Also


EnumerableUtility.Except<T> method (2 of 2)

Makes distinct and then removes a single item from a sequence.

public static IEnumerable<T> Except<T>(this IEnumerable<T> source, T item, 
    IEqualityComparer<T> comparer)
parameter description
source A sequence whose elements not matching the specified item will be returned.
item An item that will not occur in the resulting sequence.
comparer Comparer used for exclusion. If not provided, default comparer is used.

Return Value

A sequence consisting of every distinct item in the specified sequence that does not match the specified item according to the provided (or default if not provided) equality comparer.

See Also