Skip to content

T_CodeJam_Collections_KeyEqualityComparer_2

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

KeyEqualityComparer(T, TKey) Class

An implementation of the IEqualityComparer(T) interface for compare values by comparing their extracted key values.

Inheritance Hierarchy

System.Object
  CodeJam.Collections.KeyEqualityComparer(T, TKey)
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public sealed class KeyEqualityComparer<T, TKey> : IEqualityComparer<T>

VB

Public NotInheritable Class KeyEqualityComparer(Of T, TKey)
	Implements IEqualityComparer(Of T)

F#

[<SealedAttribute>]
type KeyEqualityComparer<'T, 'TKey> =  
    class
        interface IEqualityComparer<'T>
    end

Type Parameters

 

T
[Missing documentation for "T:CodeJam.Collections.KeyEqualityComparer2"\]</dd><dt>TKey</dt><dd>\[Missing <typeparam name="TKey"/> documentation for "T:CodeJam.Collections.KeyEqualityComparer2"]
  The KeyEqualityComparer(T, TKey) type exposes the following members.

Constructors

 

Name Description
Public method KeyEqualityComparer(T, TKey)(Func(T, TKey)) Initializes a new instance of the KeyEqualityComparer(T, TKey).
Public method KeyEqualityComparer(T, TKey)(Func(T, TKey), IEqualityComparer(TKey)) Initializes a new instance of the KeyEqualityComparer(T, TKey).
  Back to Top

Properties

 

Name Description
Public property Comparer Gets the equality comparer to use to compare the keys.
Public property KeySelector Gets the function to extract the key for each element.
  Back to Top

Methods

 

Name Description
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Equals(T, T) Determines whether the specified objects are equal.
Public method GetHashCode() Serves as the default hash function. (Inherited from Object.)
Public method GetHashCode(T) Returns a hash code for the specified object.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

See Also

Reference

CodeJam.Collections Namespace

Clone this wiki locally