語言

KeyComparer.Compare 方法

定義

多載

名稱 Description
Compare(IKey, IKey)

比較兩個物件,並回傳一個值,表示其中一個小於、等於或大於另一個。

Compare(IReadOnlyKey, IReadOnlyKey)

比較兩個物件,並回傳一個值,表示其中一個小於、等於或大於另一個。

Compare(IKey, IKey)

來源:
KeyComparer.cs

比較兩個物件,並回傳一個值,表示其中一個小於、等於或大於另一個。

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

參數

x
IKey

第一個比較的對象。

y
IKey

第二個比較物件。

傳回

若「x」小於「y」則為負數;若「x」大於「y」,則為正數;否則零。

實作

適用於

Compare(IReadOnlyKey, IReadOnlyKey)

來源:
KeyComparer.cs
來源:
KeyComparer.cs
來源:
KeyComparer.cs
來源:
KeyComparer.cs
來源:
KeyComparer.cs
來源:
KeyComparer.cs

比較兩個物件,並回傳一個值,表示其中一個小於、等於或大於另一個。

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

參數

x
IReadOnlyKey

第一個比較的對象。

y
IReadOnlyKey

第二個比較物件。

傳回

若「x」小於「y」則為負數;若「x」大於「y」,則為正數;否則零。

實作

適用於