.NET Framework Class Library
Int32IComparableCompareTo Method

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:   System
Assembly:  mscorlib (in mscorlib.dll)
Private Function CompareTo ( _
	value As [%$TOPIC/hh924450_en-us_VS_110_1_0_0_0_0%] _
) As [%$TOPIC/hh924450_en-us_VS_110_1_0_0_0_1%] Implements [%$TOPIC/hh924450_en-us_VS_110_1_0_0_0_2%].[%$TOPIC/hh924450_en-us_VS_110_1_0_0_0_3%]
[%$TOPIC/hh924450_en-us_VS_110_1_0_1_0_0%] [%$TOPIC/hh924450_en-us_VS_110_1_0_1_0_1%].[%$TOPIC/hh924450_en-us_VS_110_1_0_1_0_2%](
	[%$TOPIC/hh924450_en-us_VS_110_1_0_1_0_3%] value
)
private:
virtual [%$TOPIC/hh924450_en-us_VS_110_1_0_2_0_0%] CompareTo(
	[%$TOPIC/hh924450_en-us_VS_110_1_0_2_0_1%]^ value
) sealed = [%$TOPIC/hh924450_en-us_VS_110_1_0_2_0_2%]::[%$TOPIC/hh924450_en-us_VS_110_1_0_2_0_3%]
private abstract CompareTo : 
        value:[%$TOPIC/hh924450_en-us_VS_110_1_0_3_0_0%] -> [%$TOPIC/hh924450_en-us_VS_110_1_0_3_0_1%]  
private override CompareTo : 
        value:[%$TOPIC/hh924450_en-us_VS_110_1_0_3_0_2%] -> [%$TOPIC/hh924450_en-us_VS_110_1_0_3_0_3%]
JScript does not support explicit interface implementations.

Parameters

value
Type: SystemObject

An object to compare with this instance, or .

Return Value

Type: SystemInt32
A signed integer that indicates the relative order of this instance and value.

Return value

Meaning

Less than zero

This instance precedes value in the sort order.

Zero

This instance occurs in the same position as value in the sort order.

Greater than zero

This instance follows value in the sort order.

-or-

value is .

Implements

IComparableCompareTo(Object)
ExceptionCondition
ArgumentException

value is not an Int32.

This member is an explicit interface implementation. It can be used only when the Int32 instance is cast to an IComparable interface.

Portable Class Library

Supported in: Portable Class Library