DependencyObject.Equals(Object) 方法


判斷提供的 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



要與目前執行個體相比較的 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(). 覆寫會呼叫 @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/] 的功能,例如資料系結和 @no__t 1 屬性系統。This includes fundamental [!INCLUDE[TLA2#tla_winclient](~/includes/] features such as data binding and the [!INCLUDE[TLA2#tla_winclient](~/includes/] property system.