SqlHierarchyId.CompareTo 方法 (SqlHierarchyId)
Returns a value indicating the results of a comparison between two SqlHierarchyId nodes.
命名空間: Microsoft.SqlServer.Types
組件: Microsoft.SqlServer.Types (在 Microsoft.SqlServer.Types.dll 中)
語法
'宣告
Public Function CompareTo ( _
hid As SqlHierarchyId _
) As Integer
'用途
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
參數
- hid
型別:Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId node to compare to this.
傳回值
型別: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. |
備註
If both SqlHierarchyId nodes are nullnull 參考 (在 Visual Basic 中為 Nothing), returns 0.
If one SqlHierarchyId node is nullnull 參考 (在 Visual Basic 中為 Nothing), it is considered to be less than the non-nullnull 參考 (在 Visual Basic 中為 Nothing) SqlHierarchyId node.