ValueTuple.IStructuralComparable.CompareTo(Object, IComparer) 方法

定義

將目前的 ValueTuple 執行個體與指定的物件相比較。Compares the current ValueTuple instance to a specified object.

 virtual int System.Collections.IStructuralComparable.CompareTo(System::Object ^ other, System::Collections::IComparer ^ comparer) = System::Collections::IStructuralComparable::CompareTo;
int IStructuralComparable.CompareTo (object other, System.Collections.IComparer comparer);
Function CompareTo (other As Object, comparer As IComparer) As Integer Implements IStructuralComparable.CompareTo

參數

other
Object

要與目前執行個體比較的物件。The object to compare with the current instance.

comparer
IComparer

提供自訂規則進行比較的物件。An object that provides custom rules for comparison. 這個參數已忽略。This parameter is ignored.

傳回

如果 otherValueTuple 執行個體,則會傳回 0;如果 othernull,則會傳回 1。Returns 0 if other is a ValueTuple instance and 1 if other is null.

實作

例外狀況

other 不是 ValueTuple 執行個體。other is not a ValueTuple instance.

適用於