NDepend.API Documentation
Except<T> Method (ExtensionMethodsSet)
NDepend.Helpers Namespace > ExtensionMethodsSet Class : Except<T> Method
The element type of the elements of the hashset and the sequence.
A sequence of elements whose elements that are not also in hashset will be returned.
An hashset of elements whose elements that also occur in seq will cause those elements to be removed from the returned sequence.
Produces the set difference of this seq and hashset. This method is an optimized version of Enumerable.Except<T>.
Syntax
[IteratorStateMachine(NDepend.Helpers.ExtensionMethodsSet/d__12`1)] 
[Extension()] 
public static IEnumerable<T> Except<T>( 
   IEnumerable<T> seq, 
   HashSet<T> hashset 
) 
where T: class

Parameters

seq
A sequence of elements whose elements that are not also in hashset will be returned.
hashset
An hashset of elements whose elements that also occur in seq will cause those elements to be removed from the returned sequence.

Type Parameters

T
The element type of the elements of the hashset and the sequence.

Return Value

A sequence that contains the set difference of the elements of seq and hashset.
Remarks
This extension method has a O(seq.Count) time complexity.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsSet Class
ExtensionMethodsSet Members