Compartir a través de


SqlHierarchyId.CompareTo Método (SqlHierarchyId)

Returns a value indicating the results of a comparison between two SqlHierarchyId nodes.

Espacio de nombres:  Microsoft.SqlServer.Types
Ensamblado:  Microsoft.SqlServer.Types (en Microsoft.SqlServer.Types.dll)

Sintaxis

'Declaración
Public Function CompareTo ( _
    hid As SqlHierarchyId _
) As Integer
'Uso
Dim instance As SqlHierarchyId 
Dim hid As SqlHierarchyId 
Dim returnValue As Integer 

returnValue = instance.CompareTo(hid)
public int CompareTo(
    SqlHierarchyId hid
)
public:
int CompareTo(
    SqlHierarchyId hid
)
member CompareTo : 
        hid:SqlHierarchyId -> int
public function CompareTo(
    hid : SqlHierarchyId
) : int

Parámetros

Valor devuelto

Tipo: System.Int32
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:

Value

Meaning

Less than zero

this is less than obj.

Zero

this is equal to obj.

Greater than zero

this is greater than obj.

Comentarios

If both SqlHierarchyId nodes are nulles una referencia NULL (Nothing en Visual Basic)., returns 0.

If one SqlHierarchyId node is nulles una referencia NULL (Nothing en Visual Basic)., it is considered to be less than the non-nulles una referencia NULL (Nothing en Visual Basic). SqlHierarchyId node.

Vea también

Referencia

SqlHierarchyId Estructura

Sobrecarga de CompareTo

Espacio de nombres Microsoft.SqlServer.Types