CaseInsensitiveHashCodeProvider.GetHashCode(Object) CaseInsensitiveHashCodeProvider.GetHashCode(Object) CaseInsensitiveHashCodeProvider.GetHashCode(Object) CaseInsensitiveHashCodeProvider.GetHashCode(Object) Method

定義

傳回給定物件的雜湊程式碼,使用忽略字串大小寫的雜湊演算法。Returns a hash code for the given object, using a hashing algorithm that ignores the case of strings.

public:
 virtual int GetHashCode(System::Object ^ obj);
public int GetHashCode (object obj);
override this.GetHashCode : obj -> int
Public Function GetHashCode (obj As Object) As Integer

參數

obj
Object Object Object Object

要傳回雜湊碼的 ObjectThe Object for which a hash code is to be returned.

傳回

給定物件的雜湊程式碼,使用忽略字串大小寫的雜湊演算法。A hash code for the given object, using a hashing algorithm that ignores the case of strings.

實作

例外狀況

備註

基於兩個原因, 此方法的傳回值不得保存。The return value from this method must not be persisted for two reasons. 首先, 類別的雜湊函式可能會改變, 以產生更好的散發, 因此從舊的雜湊函式轉譯任何值是無用的。First, the hash function of a class might be altered to generate a better distribution, thereby rendering any values from the old hash function useless. 第二, 此類別的預設執行不保證會由不同的實例傳回相同的值。Second, the default implementation of this class does not guarantee that the same value will be returned by different instances.

適用於

另請參閱