StringComparer.IEqualityComparer.GetHashCode(Object) 方法

定义

返回指定对象的哈希代码。Returns a hash code for the specified object.

 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

参数

obj
Object

要从中获取哈希代码的对象。The object from which to obtain the hash code.

返回

Int32

指定对象的哈希代码。A hash code for the specified object.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 StringComparer 实例被强制转换为 IEqualityComparer 接口时使用。It can be used only when the StringComparer instance is cast to an IEqualityComparer interface.

适用于