EqualityComparer<T>.IEqualityComparer.GetHashCode(Object) Metodo

Definizione

Restituisce un codice hash per l'oggetto specificato.

 virtual int System.Collections.IEqualityComparer.GetHashCode(System::Object ^ obj) = System::Collections::IEqualityComparer::GetHashCode;
int IEqualityComparer.GetHashCode(object obj);
abstract member System.Collections.IEqualityComparer.GetHashCode : obj -> int
override this.System.Collections.IEqualityComparer.GetHashCode : obj -> int
Function GetHashCode (obj As Object) As Integer Implements IEqualityComparer.GetHashCode

Parametri

obj
Object

Oggetto Object per il quale deve essere restituito un codice hash.

Valori restituiti

Codice hash per l'oggetto specificato.

Implementazioni

Eccezioni

Il tipo di obj è un tipo riferimento e obj è null.

oppure

obj è di un tipo che non può essere eseguito il cast al tipo T.

Commenti

Questo metodo è un wrapper per il GetHashCode(T) metodo , pertanto obj deve essere un tipo che può essere sottoposto a cast al tipo specificato dall'argomento T di tipo generico dell'istanza corrente.

Si applica a