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.

適用於