語言

DataServiceProviderMethods.Compare 方法

定義

多載

名稱 Description
Compare(Boolean, Boolean)

回傳運算式中布林參數的比較資訊。

Compare(Guid, Guid)

在操作表達式中回傳 GUID 參數的比較資訊。

Compare(Nullable<Boolean>, Nullable<Boolean>)

回傳可空布林參數的比較資訊,包含操作表達式。

Compare(Nullable<Guid>, Nullable<Guid>)

在操作表達式中回傳可空的 GUID 參數比較資訊。

Compare(String, String)

回傳操作表達式中字串參數的比較資訊。

Compare(Boolean, Boolean)

回傳運算式中布林參數的比較資訊。

public:
 static int Compare(bool left, bool right);
public static int Compare(bool left, bool right);
static member Compare : bool * bool -> int
Public Shared Function Compare (left As Boolean, right As Boolean) As Integer

參數

left
Boolean

第一個參數值。

right
Boolean

第二個參數值。

傳回

價值 條件
1- left 小於 right。
0 x 等於 y。
1 left 大於 right。

備註

在此比較中, true 大於 false。

適用於

Compare(Guid, Guid)

在操作表達式中回傳 GUID 參數的比較資訊。

public:
 static int Compare(Guid left, Guid right);
public static int Compare(Guid left, Guid right);
static member Compare : Guid * Guid -> int
Public Shared Function Compare (left As Guid, right As Guid) As Integer

參數

left
Guid

第一個參數值。

right
Guid

第二個參數值。

傳回

價值 條件
1- left 小於 right。
0 x 等於 y。
1 left 大於 right。

備註

比較是依位元組順序進行。

適用於

Compare(Nullable<Boolean>, Nullable<Boolean>)

回傳可空布林參數的比較資訊,包含操作表達式。

public:
 static int Compare(Nullable<bool> left, Nullable<bool> right);
public static int Compare(bool? left, bool? right);
static member Compare : Nullable<bool> * Nullable<bool> -> int
Public Shared Function Compare (left As Nullable(Of Boolean), right As Nullable(Of Boolean)) As Integer

參數

left
Nullable<Boolean>

第一個參數值。

right
Nullable<Boolean>

第二個參數值。

傳回

價值 條件
1- left 小於 right。
0 x 等於 y。
1 left 大於 right。

備註

在此比較中, true 大於 false。

適用於

Compare(Nullable<Guid>, Nullable<Guid>)

在操作表達式中回傳可空的 GUID 參數比較資訊。

public:
 static int Compare(Nullable<Guid> left, Nullable<Guid> right);
public static int Compare(Guid? left, Guid? right);
static member Compare : Nullable<Guid> * Nullable<Guid> -> int
Public Shared Function Compare (left As Nullable(Of Guid), right As Nullable(Of Guid)) As Integer

參數

left
Nullable<Guid>

第一個參數值。

right
Nullable<Guid>

第二個參數值。

傳回

價值 條件
1- left 小於 right。
0 x 等於 y。
1 left 大於 right。

備註

比較是依位元組順序進行。

適用於

Compare(String, String)

回傳操作表達式中字串參數的比較資訊。

public:
 static int Compare(System::String ^ left, System::String ^ right);
public static int Compare(string left, string right);
static member Compare : string * string -> int
Public Shared Function Compare (left As String, right As String) As Integer

參數

left
String

第一個參數值。

right
String

第二個參數值。

傳回

價值 條件
1- left 小於 right。
0 x 等於 y。
1 left 大於 right。

備註

比較是依序進行。

適用於