IComparer(K).Compare 方法

不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 Compares two keys.

命名空间:  Microsoft.SqlServer.Management.Sdk.Sfc
程序集:  Microsoft.SqlServer.Management.Sdk.Sfc(在 Microsoft.SqlServer.Management.Sdk.Sfc.dll 中)

语法

声明
Private Function Compare ( _
    key1 As K, _
    key2 As K _
) As Integer Implements IComparer(Of K).Compare
用法
Dim instance As SfcCollatedDictionaryCollection
Dim key1 As K
Dim key2 As K
Dim returnValue As Integer

returnValue = CType(instance, IComparer(Of K)).Compare(key1, _
    key2)
int IComparer<K>.Compare(
    K key1,
    K key2
)
private:
virtual int Compare(
    K key1, 
    K key2
) sealed = IComparer<K>::Compare
private abstract Compare : 
        key1:'K * 
        key2:'K -> int 
private override Compare : 
        key1:'K * 
        key2:'K -> int 
JScript 支持使用显式接口实现,但不支持声明新显式接口实现。

参数

  • key1
    类型:K
    The first key to compare.
  • key2
    类型:K
    The second key to compare.

返回值

类型:System. . :: . .Int32
A Int32 value.

实现

IComparer< (Of < ( <'T> ) > ) >. . :: . .Compare(T, T)