Npgsql Api Docs

BitString.CompareTo Method (BitString)

Compares two strings. Strings are compared as strings, so while 0 being less than 1 will mean a comparison between two strings of the same size is the same as treating them as numbers, in the case of two strings of differing lengths the comparison starts at the right-most (most significant) bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100).

[Visual Basic]
NotOverridable Overloads Public Function CompareTo( _
   ByVal other As BitString _
) As Integer _
    Implements IComparable`1.CompareTo
[C#]
public int CompareTo(
   BitString other
);

Parameters

other
Another string to compare with this one.

Return Value

A value if the two strings are identical, an integer less than zero if this is less than the argument, and an integer greater than zero otherwise.

Implements

IComparable`1.CompareTo

See Also

BitString Class | NpgsqlTypes Namespace | BitString.CompareTo Overload List