SqlInt32.CompareTo 方法

定义

将此实例与所提供的对象进行比较,并返回其相对值的指示值。Compares this instance to the supplied object and returns an indication of their relative values.

重载

CompareTo(SqlInt32)

将此 SqlInt32 实例与所提供的 SqlInt32 进行比较,并返回二者相对值的指示值。Compares this SqlInt32 instance to the supplied SqlInt32 and returns an indication of their relative values.

CompareTo(Object)

将此 SqlInt32 实例与所提供的 Object 进行比较,并返回二者相对值的指示值。Compares this SqlInt32 instance to the supplied Object and returns an indication of their relative values.

CompareTo(SqlInt32)

将此 SqlInt32 实例与所提供的 SqlInt32 进行比较,并返回二者相对值的指示值。Compares this SqlInt32 instance to the supplied SqlInt32 and returns an indication of their relative values.

public:
 int CompareTo(System::Data::SqlTypes::SqlInt32 value);
public int CompareTo (System.Data.SqlTypes.SqlInt32 value);
member this.CompareTo : System.Data.SqlTypes.SqlInt32 -> int
Public Function CompareTo (value As SqlInt32) As Integer

参数

value
SqlInt32

要比较的 SqlInt32The SqlInt32 to be compared.

返回

一个有符号的数字,它指示该实例和对象的相对值。A signed number that indicates the relative values of the instance and the object.

返回值Return value 条件Condition
小于零Less than zero 此实例小于该对象。This instance is less than the object.
Zero 此实例等于该对象。This instance is the same as the object.
大于零Greater than zero 此实例大于该对象This instance is greater than the object - 或 --or- 该对象是空引用(在 Visual Basic 中为 NothingThe object is a null reference (Nothing in Visual Basic)

另请参阅

CompareTo(Object)

将此 SqlInt32 实例与所提供的 Object 进行比较,并返回二者相对值的指示值。Compares this SqlInt32 instance to the supplied Object and returns an indication of their relative values.

public:
 virtual int CompareTo(System::Object ^ value);
public int CompareTo (object value);
abstract member CompareTo : obj -> int
override this.CompareTo : obj -> int
Public Function CompareTo (value As Object) As Integer

参数

value
Object

要比较的 ObjectThe Object to be compared.

返回

一个有符号的数字,它指示该实例和对象的相对值。A signed number that indicates the relative values of the instance and the object.

返回值Return value 条件Condition
小于零Less than zero 此实例小于该对象。This instance is less than the object.
Zero 此实例等于该对象。This instance is the same as the object.
大于零Greater than zero 此实例大于该对象This instance is greater than the object - 或 --or- 该对象是空引用(在 Visual Basic 中为 Nothing)。The object is a null reference (Nothing in Visual Basic).

实现

另请参阅

适用于