共用方式為


SqlHierarchyId.CompareTo 方法 (Object)

Returns a value indicating the results of a comparison between a SqlHierarchyId and an object.

命名空間:  Microsoft.SqlServer.Types
組件:  Microsoft.SqlServer.Types (在 Microsoft.SqlServer.Types.dll 中)

語法

'宣告
Public Function CompareTo ( _
    obj As Object _
) As Integer
'用途
Dim instance As SqlHierarchyId 
Dim obj As Object 
Dim returnValue As Integer 

returnValue = instance.CompareTo(obj)
public int CompareTo(
    Object obj
)
public:
virtual int CompareTo(
    Object^ obj
) sealed
abstract CompareTo : 
        obj:Object -> int  
override CompareTo : 
        obj:Object -> int
public final function CompareTo(
    obj : Object
) : int

參數

傳回值

型別: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.

實作

IComparable.CompareTo(Object)

備註

Throws an exception if obj is not a SqlHierarchyId node.

This member is sealed.

請參閱

參考

SqlHierarchyId 結構

CompareTo 多載

Microsoft.SqlServer.Types 命名空間