共用方式為


BackupDeviceItem.CompareTo 方法

Verifies whether the specified object shares the same name as the referenced BackupDeviceItem object.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.SmoExtended (在 Microsoft.SqlServer.SmoExtended.dll 中)

語法

'宣告
Public Function CompareTo ( _
    obj As Object _
) As Integer
'用途
Dim instance As BackupDeviceItem 
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
An Int32 value that specifies the lexical relationship between the two strings.

Value

Description

Less than zero

The referenced object name is less than the object name that is specified by the parameter.

Zero

The referenced object name is equal to the object name that is specified by the parameter.

Greater than zero

The referenced object name is greater than the object name that is specified by the parameter.

實作

IComparable.CompareTo(Object)

備註

The comparison of object names is case-insensitive.

-

範例

備份及還原資料庫和交易記錄

請參閱

參考

BackupDeviceItem 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

BACKUP (Transact-SQL)