Back to Devexpress

Comparison Members

coderushforroslyn-401066-coding-assistance-declare-menu-declare-providers-comparison-members.md

latest770 B
Original Source

Comparison Members

  • Jul 15, 2019

Generates a CompareTo implementation and optionally implements the IComparable<T> and IComparable interfaces.

Selectable items : members to compare on objects’ comparison.

Options :

  • Implement IComparable<T> and IComparable interfaces — adds interfaces implementation to the target type.
  • Overload relational members — implements the overloads of the “ > “, “ < “, “ >= “ and “ <= “ operators to call the custom CompareTo method.

Example

The screencast below shows how to use the Comparison Members action in the Declare Menu.