IComparisonOperators<TSelf,TOther> Interface

Definition

Defines a mechanism for comparing two values to determine relative order.

generic <typename TSelf, typename TOther>
 where TSelf : IComparisonOperators<TSelf, TOther>public interface class IComparisonOperators : IComparable, IComparable<TOther>, IEqualityOperators<TSelf, TOther>, IEquatable<TOther>
[System.Runtime.Versioning.RequiresPreviewFeatures("Generic Math is in preview.", Url="https://aka.ms/dotnet-warnings/generic-math-preview")]
public interface IComparisonOperators<TSelf,TOther> : IComparable, IComparable<TOther>, IEqualityOperators<TSelf,TOther>, IEquatable<TOther> where TSelf : IComparisonOperators<TSelf,TOther>
[<System.Runtime.Versioning.RequiresPreviewFeatures("Generic Math is in preview.", Url="https://aka.ms/dotnet-warnings/generic-math-preview")>]
type IComparisonOperators<'Self, 'Other (requires 'Self :> IComparisonOperators<'Self, 'Other>)> = interface
    interface IComparable
    interface IComparable<'Other>
    interface IEqualityOperators<'Self, 'Other (requires 'Self :> IComparisonOperators<'Self, 'Other>)>
    interface IEquatable<'Other>
Public Interface IComparisonOperators(Of TSelf, TOther)
Implements IComparable, IComparable(Of TOther), IEqualityOperators(Of TSelf, TOther), IEquatable(Of TOther)

Type Parameters

TSelf

The type that implements this interface.

TOther

The type that will be compared with TSelf.

Derived
Attributes
Implements

Methods

CompareTo(Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

(Inherited from IComparable)
CompareTo(T)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

(Inherited from IComparable<T>)
Equals(T)

Indicates whether the current object is equal to another object of the same type.

(Inherited from IEquatable<T>)

Operators

GreaterThan(TSelf, TOther)

Compares two values to determine which is greater.

GreaterThanOrEqual(TSelf, TOther)

Compares two values to determine which is greater or equal.

LessThan(TSelf, TOther)

Compares two values to determine which is less.

LessThanOrEqual(TSelf, TOther)

Compares two values to determine which is less or equal.

Applies to