DependencyObject.Equals(Object) DependencyObject.Equals(Object) DependencyObject.Equals(Object) DependencyObject.Equals(Object) Method


判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

 override bool Equals(System::Object ^ obj);
public override sealed bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides NotOverridable Function Equals (obj As Object) As Boolean


Object Object Object Object

要與目前執行個體相比較的 DependencyObjectThe DependencyObject to compare to the current instance.


如果兩個執行個體相等,就是 true,否則就是 false.true if the two instances are the same; otherwise, false.


此實作是參考相等,並不會嘗試評估包含屬性的值相等。This implementation is reference equality only, and does not attempt to evaluate value equality of the contained properties.


DependencyObject 覆寫,並接著密封兩個基本Object方法:Equals(Object)GetHashCode() DependencyObject overrides and then seals two basic 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. 值的等式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.