Language

Enumerable.ExceptBy Method

Definition

Overloads

Name Description
ExceptBy(IEnumerable, IEnumerable, Func)

Produces the set difference of two sequences according to a specified key selector function.

ExceptBy(IEnumerable, IEnumerable, Func, IEqualityComparer)

Produces the set difference of two sequences according to a specified key selector function.

ExceptBy(IEnumerable, IEnumerable, Func)

Source:
Except.cs
Source:
Except.cs
Source:
Except.cs
Source:
Except.cs
Source:
Except.cs

Produces the set difference of two sequences according to a specified key selector function.

public:
generic 
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable ^ ExceptBy(System::Collections::Generic::IEnumerable ^ first, System::Collections::Generic::IEnumerable ^ second, Func ^ keySelector);
public static System.Collections.Generic.IEnumerable ExceptBy(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, Func keySelector);
static member ExceptBy : seq<'Source> * seq<'Key> * Func<'Source, 'Key> -> seq<'Source>

Public Function ExceptBy(Of TSource, TKey) (first As IEnumerable(Of TSource), second As IEnumerable(Of TKey), keySelector As Func(Of TSource, TKey)) As IEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of the input sequence.

TKey

The type of key to identify elements by.

Parameters

first
IEnumerable

An IEnumerable whose keys that are not also in second will be returned.

second
IEnumerable

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

keySelector
Func

A function to extract the key for each element.

Returns

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

See also

Applies to

ExceptBy(IEnumerable, IEnumerable, Func, IEqualityComparer)

Source:
Except.cs
Source:
Except.cs
Source:
Except.cs
Source:
Except.cs
Source:
Except.cs

Produces the set difference of two sequences according to a specified key selector function.

public:
generic 
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable ^ ExceptBy(System::Collections::Generic::IEnumerable ^ first, System::Collections::Generic::IEnumerable ^ second, Func ^ keySelector, System::Collections::Generic::IEqualityComparer ^ comparer);
public static System.Collections.Generic.IEnumerable ExceptBy(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, Func keySelector, System.Collections.Generic.IEqualityComparer? comparer);
static member ExceptBy : seq<'Source> * seq<'Key> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> seq<'Source>

Public Function ExceptBy(Of TSource, TKey) (first As IEnumerable(Of TSource), second As IEnumerable(Of TKey), keySelector As Func(Of TSource, TKey), comparer As IEqualityComparer(Of TKey)) As IEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of the input sequence.

TKey

The type of key to identify elements by.

Parameters

first
IEnumerable

An IEnumerable whose keys that are not also in second will be returned.

second
IEnumerable

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

keySelector
Func

A function to extract the key for each element.

comparer
IEqualityComparer

The IEqualityComparer to compare values.

Returns

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

See also

Applies to