Array.IStructuralComparable.CompareTo(Object, IComparer) Méthode
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Détermine si l'objet collection actuel précède, se situe à la même position que, ou suit un autre objet dans l'ordre de tri.
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);
abstract member System.Collections.IStructuralComparable.CompareTo : obj * System.Collections.IComparer -> int
override this.System.Collections.IStructuralComparable.CompareTo : obj * System.Collections.IComparer -> int
Function CompareTo (other As Object, comparer As IComparer) As Integer Implements IStructuralComparable.CompareTo
- other
- Object
Objet à comparer à l’instance actuelle.
- comparer
- IComparer
Objet qui compare l’objet actuel à un objet other
.
Entier qui indique la relation de l’objet de collection actuel par rapport aux autres objets, comme indiqué dans le tableau suivant.
Valeur retournée | Description |
---|---|
-1 | L'instance actuelle précède other .
|
0 | L'instance actuelle et other sont égaux.
|
1 | L'instance actuelle suit other .
|
Ce membre est une implémentation d'un membre d'interface explicite. Il peut uniquement être utilisé lorsque l'instance de Array est castée en interface IStructuralComparable.
Produit | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |