ValueTuple.IComparable.CompareTo(Object) 方法

定义

将此 ValueTuple 实例与指定对象进行比较并返回一个对二者的相对值的指示。Compares this ValueTuple instance with a specified object and returns an indication of their relative values.

 virtual int System.IComparable.CompareTo(System::Object ^ other) = IComparable::CompareTo;
int IComparable.CompareTo (object other);
Function CompareTo (other As Object) As Integer Implements IComparable.CompareTo

参数

other
Object

要与当前实例进行比较的对象The object to compare with the current instance

返回

如果 otherValueTuple 实例,则为 0;如果 othernull,则为 1。0 if other is a ValueTuple instance; otherwise, 1 if other is null.

实现

异常

other 不是 ValueTuple 实例。other is not a ValueTuple instance.

适用于