DependencyObject.GetHashCode DependencyObject.GetHashCode DependencyObject.GetHashCode DependencyObject.GetHashCode Method

定义

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

public:
 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.

继承者说明

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. 这些有意的替代的目的是防止派生类尝试为指定值相等性DependencyObjectThe purpose of these deliberate overrides is to prevent derived classes from trying to define a value equality for a DependencyObject. 的值 equalities DependencyObject将永远不准确DependencyObject , 这是因为原始属性值更改功能及其依赖属性。Value equalities for DependencyObject will never be accurate because of the innate property value-changing capabilities of a DependencyObject and its dependency properties. 这包括数据WPFWPF绑定WPFWPF和属性系统等基础功能。This includes fundamental WPFWPF features such as data binding and the WPFWPF property system.

适用于