DependencyObject.GetHashCode Method


获取此 DependencyObject 的哈希代码。Gets a hash code for this DependencyObject.

 override int GetHashCode();
public override sealed int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides NotOverridable Function GetHashCode () As Integer



带符号 32 位整数哈希代码。A signed 32-bit integer hash code.

Notes to Inheritors

DependencyObject 重写,然后密封两个 Object 方法: Equals(Object)GetHashCode() DependencyObject overrides and then seals two Object methods: Equals(Object) and GetHashCode(). 重写调用 Object 实现,导致对象相等性行为。The overrides call the Object implementations, resulting in an object equality behavior. 这些有意的替代的目的是防止派生类尝试为 DependencyObject定义值相等性。The purpose of these deliberate overrides is to prevent derived classes from trying to define a value equality for a DependencyObject. 由于 DependencyObject 及其依赖属性的原始属性值更改功能,DependencyObject 的值 equalities 将永远不准确。Value equalities for DependencyObject will never be accurate because of the innate property value-changing capabilities of a DependencyObject and its dependency properties. 这包括基本 [!INCLUDE[TLA2#tla_winclient](~/includes/] 功能,如数据绑定和 [!INCLUDE[TLA2#tla_winclient](~/includes/] 属性系统。This includes fundamental [!INCLUDE[TLA2#tla_winclient](~/includes/] features such as data binding and the [!INCLUDE[TLA2#tla_winclient](~/includes/] property system.

Applies to