Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SqlHierarchyId.CompareTo Method (SqlHierarchyId)

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

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
public int CompareTo(
	SqlHierarchyId hid


Type: Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId node to compare to this.

Return Value

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



Less than zero

this is less than obj.


this is equal to obj.

Greater than zero

this is greater than obj.

If both SqlHierarchyId nodes are null, returns 0.

If one SqlHierarchyId node is null, it is considered to be less than the non-null SqlHierarchyId node.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.