Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Compares this instance to a specified object and returns an indication of their relative values.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function CompareTo ( _
value As Object _
) As Integer
public int CompareTo(
Object value
)
public:
int CompareTo(
Object^ value
)
member CompareTo :
value:Object -> int
public function CompareTo(
value : Object
) : int
Parameters
- value
Type: System. . :: . .Object
An object to compare, or nullNothingnullptrunita null reference (Nothing in Visual Basic).
Return Value
Type: System. . :: . .Int32
A signed number indicating the relative values of this instance and value.
Return value |
Description |
---|---|
A negative integer |
This instance is less than value. |
Zero |
This instance is equal to value. |
A positive integer |
This instance is greater than value, or value is nullNothingnullptrunita null reference (Nothing in Visual Basic). |
Remarks
Any instance of Guid, regardless of its value, is considered greater than null Nothing nullptr unit a null reference (Nothing in Visual Basic) .
The value parameter must be null Nothing nullptr unit a null reference (Nothing in Visual Basic) or an instance of Guid; otherwise, an exception is thrown.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.