語言

IndexComparer 類別

定義

實作 IComparer<T> 並 IEqualityComparer<T> 比較 IReadOnlyIndex 實例。

此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。

[System.Runtime.CompilerServices.Nullable(0)]
public sealed class IndexComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>
public sealed class IndexComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IIndex>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IIndex>
public sealed class IndexComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>
[<System.Runtime.CompilerServices.Nullable(0)>]
type IndexComparer = class
    interface IEqualityComparer<IReadOnlyIndex>
    interface IComparer<IReadOnlyIndex>
type IndexComparer = class
    interface IEqualityComparer<IIndex>
    interface IComparer<IIndex>
type IndexComparer = class
    interface IEqualityComparer<IReadOnlyIndex>
    interface IComparer<IReadOnlyIndex>
Public NotInheritable Class IndexComparer
Implements IComparer(Of IReadOnlyIndex), IEqualityComparer(Of IReadOnlyIndex)
Public NotInheritable Class IndexComparer
Implements IComparer(Of IIndex), IEqualityComparer(Of IIndex)
繼承
IndexComparer
屬性
實作

備註

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

欄位

名稱 Description
Instance

比較器的單例實例 to use。

方法

名稱 Description
Compare(IIndex, IIndex)

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

Compare(IReadOnlyIndex, IReadOnlyIndex)

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

Equals(IIndex, IIndex)

判斷指定物件是否相等。

Equals(IReadOnlyIndex, IReadOnlyIndex)

判斷指定物件是否相等。

GetHashCode(IIndex)

會回傳指定物件的雜湊碼。

GetHashCode(IReadOnlyIndex)

會回傳指定物件的雜湊碼。

適用於