Skip to content

M_CodeJam_Collections_KeyEqualityComparer_Create__2_1

Andrew Koryavchenko edited this page Jun 17, 2018 · 7 revisions

KeyEqualityComparer.Create(T, TKey) Method (Func(T, TKey), IEqualityComparer(TKey))

Creates a KeyEqualityComparer(T, TKey).

Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static KeyEqualityComparer<T, TKey> Create<T, TKey>(
	Func<T, TKey> keySelector,
	IEqualityComparer<TKey> comparer
)

VB

Public Shared Function Create(Of T, TKey) ( 
	keySelector As Func(Of T, TKey),
	comparer As IEqualityComparer(Of TKey)
) As KeyEqualityComparer(Of T, TKey)

F#

static member Create : 
        keySelector : Func<'T, 'TKey> * 
        comparer : IEqualityComparer<'TKey> -> KeyEqualityComparer<'T, 'TKey> 

Parameters

 

keySelector
Type: System.Func(T, TKey)
The function to extract the key for each element.
comparer
Type: System.Collections.Generic.IEqualityComparer(TKey)
The equality comparer to use to compare the keys.

Type Parameters

 

T
The type of the comparing elements.
TKey
The type of the key.

Return Value

Type: KeyEqualityComparer(T, TKey)
A KeyEqualityComparer(T, TKey).

See Also

Reference

KeyEqualityComparer Class
Create Overload
CodeJam.Collections Namespace

Clone this wiki locally