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. 的值 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.