DependencyObject.GetHashCode DependencyObject.GetHashCode DependencyObject.GetHashCode 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.


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.