Skip to content

M_CodeJam_Collections_KeyEqualityComparer_2__ctor_1

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

KeyEqualityComparer(T, TKey) Constructor (Func(T, TKey), IEqualityComparer(TKey))

Initializes a new instance of the KeyEqualityComparer(T, TKey).

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

Syntax

C#

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

VB

Public Sub New ( 
	keySelector As Func(Of T, TKey),
	comparer As IEqualityComparer(Of TKey)
)

F#

new : 
        keySelector : Func<'T, 'TKey> * 
        comparer : IEqualityComparer<'TKey> -> KeyEqualityComparer

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.

See Also

Reference

KeyEqualityComparer(T, TKey) Class
KeyEqualityComparer(T, TKey) Overload
CodeJam.Collections Namespace

Clone this wiki locally