Share via


BackupDeviceItem.CompareTo Method

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

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Function CompareTo ( _
    obj As Object _
) As Integer
public int CompareTo (
    Object obj
)
public:
virtual int CompareTo (
    Object^ obj
) sealed
public final int CompareTo (
    Object obj
)
public final function CompareTo (
    obj : Object
) : int

Parameters

  • obj
    A Object object value that is used to specify object that is compared with referenced BackupDeviceItem object.

Return Value

A 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 specified by the parameter.

Zero

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

Greater than zero

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

Remarks

Updated text:

The comparison of object names is case-insensitive, meaning that "MyTable" is the same as "mytable".

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

BackupDeviceItem Class
BackupDeviceItem Members
Microsoft.SqlServer.Management.Smo Namespace

Other Resources

How to: Back Up Databases and Transaction Logs in Visual Basic .NET
BACKUP (Transact-SQL)
Backing Up and Restoring Databases in SQL Server

Change History

Release

History

New content:
  • Added to the description of the CompareTo method return values.