SqlGuid.CompareTo Method

Definition

Compares this SqlGuid structure to the supplied object and returns an indication of their relative values.

Overloads

CompareTo(SqlGuid)

Compares this SqlGuid structure to the supplied SqlGuid and returns an indication of their relative values. Compares more than the last 6 bytes, but treats the last 6 bytes as the most significant ones in comparisons.

CompareTo(Object)

Compares this SqlGuid structure to the supplied object and returns an indication of their relative values. Compares more than the last 6 bytes, but treats the last 6 bytes as the most significant ones in comparisons.

Remarks

Compares more than the last 6 bytes, but treats the last 6 bytes as the most significant ones in comparisons.

CompareTo(SqlGuid)

Source:
SQLGuid.cs
Source:
SQLGuid.cs
Source:
SQLGuid.cs

Compares this SqlGuid structure to the supplied SqlGuid and returns an indication of their relative values. Compares more than the last 6 bytes, but treats the last 6 bytes as the most significant ones in comparisons.

C#
public int CompareTo(System.Data.SqlTypes.SqlGuid value);

Parameters

value
SqlGuid

The SqlGuid to be compared.

Returns

A signed number that indicates the relative values of the instance and the object.

Return Value Condition
Less than zero This instance is less than object.
Zero This instance is the same as object.
Greater than zero This instance is greater than object

-or-

object is a null reference (Nothing).

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

CompareTo(Object)

Source:
SQLGuid.cs
Source:
SQLGuid.cs
Source:
SQLGuid.cs

Compares this SqlGuid structure to the supplied object and returns an indication of their relative values. Compares more than the last 6 bytes, but treats the last 6 bytes as the most significant ones in comparisons.

C#
public int CompareTo(object? value);
C#
public int CompareTo(object value);

Parameters

value
Object

The Object to be compared.

Returns

A signed number that indicates the relative values of the instance and the object.

Return Value Condition
Less than zero This instance is less than object.
Zero This instance is the same as object.
Greater than zero This instance is greater than object

-or-

object is a null reference (Nothing)

Implements

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1