共用方式為


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)