AvaloniaObjectEquals Method
Compares two objects using reference equality.
Namespace: AvaloniaAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public override sealed bool Equals(
Object? obj
)
Public Overrides NotOverridable Function Equals (
obj As Object
) As Boolean
abstract Equals :
obj : Object -> bool
override Equals :
obj : Object -> bool
- obj Object
- The object to compare.
Boolean
Overriding Equals and GetHashCode on an AvaloniaObject is disallowed for two reasons:
- AvaloniaObjects are by their nature mutable
- The presence of attached properties means that the semantics of equality are
difficult to define
See https://github.com/AvaloniaUI/Avalonia/pull/2747 for the discussion that prompted
this.