DependencyObject.GetHashCode 方法

定義

取得這個 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(). 覆寫會呼叫 @no__t 0 的實作為,因而導致物件相等的行為。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. @No__t-1 及其相依性屬性的固有屬性值變更功能,@no__t 0 的值 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/tla2sharptla-winclient-md.md)] 的功能,例如資料系結和 @no__t 1 屬性系統。This includes fundamental [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] features such as data binding and the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] property system.

適用於