ObjectReferenceEqualityComparer.IEqualityComparer<Object>.GetHashCode 方法
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
获取指定对象的哈希代码。
命名空间: System.Data.Entity.Infrastructure
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
Private Function GetHashCode ( _
obj As Object _
) As Integer Implements IEqualityComparer(Of Object).GetHashCode
用法
Dim instance As ObjectReferenceEqualityComparer
Dim obj As Object
Dim returnValue As Integer
returnValue = CType(instance, IEqualityComparer(Of Object)).GetHashCode(obj)
int IEqualityComparer<Object>.GetHashCode(
Object obj
)
private:
virtual int GetHashCode(
Object^ obj
) sealed = IEqualityComparer<Object^>::GetHashCode
private abstract GetHashCode :
obj:Object -> int
private override GetHashCode :
obj:Object -> int
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
参数
- obj
类型:System.Object
对象。
返回值
类型:System.Int32
指定对象的哈希代码。
Implements
IEqualityComparer<T>.GetHashCode(T)