Share via


KeyComparer.Compare Method

Definition

Overloads

Compare(IKey, IKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Compare(IReadOnlyKey, IReadOnlyKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Compare(IKey, IKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

public int Compare (Microsoft.EntityFrameworkCore.Metadata.IKey x, Microsoft.EntityFrameworkCore.Metadata.IKey y);
abstract member Compare : Microsoft.EntityFrameworkCore.Metadata.IKey * Microsoft.EntityFrameworkCore.Metadata.IKey -> int
override this.Compare : Microsoft.EntityFrameworkCore.Metadata.IKey * Microsoft.EntityFrameworkCore.Metadata.IKey -> int
Public Function Compare (x As IKey, y As IKey) As Integer

Parameters

x
IKey

The first object to compare.

y
IKey

The second object to compare.

Returns

A negative number if 'x' is less than 'y'; a positive number if 'x' is greater than 'y'; zero otherwise.

Implements

Applies to

Compare(IReadOnlyKey, IReadOnlyKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

public int Compare (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey? x, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey? y);
abstract member Compare : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey -> int
override this.Compare : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey -> int
Public Function Compare (x As IReadOnlyKey, y As IReadOnlyKey) As Integer

Parameters

x
IReadOnlyKey

The first object to compare.

y
IReadOnlyKey

The second object to compare.

Returns

A negative number if 'x' is less than 'y'; a positive number if 'x' is greater than 'y'; zero otherwise.

Implements

Applies to