Share via


TestId.CompareTo Method (Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

Syntax

'Declaration
Public Function CompareTo ( _
    other As Object _
) As Integer
public int CompareTo(
    Object other
)
public:
virtual int CompareTo(
    Object^ other
) sealed
abstract CompareTo : 
        other:Object -> int  
override CompareTo : 
        other:Object -> int
public final function CompareTo(
    other : Object
) : int

Parameters

  • other
    Type: Object

    An object that can be cast to a TestId object.

Return Value

Type: Int32
An integer that indicates whether this instance comes before, follows, or appears in the same position in the sort order as the specified object.

Implements

IComparable.CompareTo(Object)

Exceptions

Exception Condition
[ArgumentException]

The other object is not a TestId object.

.NET Framework Security

See Also

Reference

TestId Class

CompareTo Overload

Microsoft.VisualStudio.TestTools.Common Namespace