Επεξεργασία

Κοινή χρήση μέσω


DataServiceProviderMethods.Compare Method

Definition

Overloads

Compare(Boolean, Boolean)

Returns comparison information for Boolean parameters in an operation expression.

Compare(Guid, Guid)

Returns comparison information for GUID parameters in an operation expression.

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

Returns comparison information for nullable Boolean parameters in an operation expression.

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

Returns comparison information for nullable GUID parameters in an operation expression.

Compare(String, String)

Returns comparison information for string parameters in an operation expression.

Compare(Boolean, Boolean)

Returns comparison information for Boolean parameters in an operation expression.

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

Parameters

left
Boolean

The first parameter value.

right
Boolean

The second parameter value.

Returns

Value Condition
-1 left is less than right.
0 x equals y.
1 left is greater than right.

Remarks

In this comparison, true is greater than false.

Applies to

Compare(Guid, Guid)

Returns comparison information for GUID parameters in an operation expression.

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

Parameters

left
Guid

The first parameter value.

right
Guid

The second parameter value.

Returns

Value Condition
-1 left is less than right.
0 x equals y.
1 left is greater than right.

Remarks

The comparison is performed by byte order.

Applies to

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

Returns comparison information for nullable Boolean parameters in an operation expression.

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

Parameters

left
Nullable<Boolean>

The first parameter value.

right
Nullable<Boolean>

The second parameter value.

Returns

Value Condition
-1 left is less than right.
0 x equals y.
1 left is greater than right.

Remarks

In this comparison, true is greater than false.

Applies to

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

Returns comparison information for nullable GUID parameters in an operation expression.

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

Parameters

left
Nullable<Guid>

The first parameter value.

right
Nullable<Guid>

The second parameter value.

Returns

Value Condition
-1 left is less than right.
0 x equals y.
1 left is greater than right.

Remarks

The comparison is performed by byte order.

Applies to

Compare(String, String)

Returns comparison information for string parameters in an operation expression.

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

Parameters

left
String

The first parameter value.

right
String

The second parameter value.

Returns

Value Condition
-1 left is less than right.
0 x equals y.
1 left is greater than right.

Remarks

The comparison is performed by ordinal order.

Applies to