DependencyObject.GetHashCode 方法


取得這個 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.


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 的值 equalities 永遠不會正確,因為 DependencyObject 的固有屬性值變更功能及其相依性屬性。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.