Skip to content

M_CodeJam_Collections_KeyEqualityComparer_Create__2_1

andrewvk edited this page Mar 30, 2016 · 7 revisions

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

[This is preliminary documentation and is subject to change.]

Creates a .

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

Syntax

C#

[NotNullAttribute]
public static KeyEqualityComparer<T, TKey> Create<T, TKey>(
	[NotNullAttribute] Func<T, TKey> keySelector,
	[CanBeNullAttribute] IEqualityComparer<TKey> comparer
)

VB

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

F#

[<NotNullAttribute>]
static member Create : 
        [<NotNullAttribute>] keySelector : Func<'T, 'TKey> * 
        [<CanBeNullAttribute>] 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 .

See Also

Reference

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

Clone this wiki locally