Array.IStructuralComparable.CompareTo(Object, IComparer) Método
Definição
Determina se o objeto da coleção atual precede, ocorre na mesma posição ou segue a outro objeto na ordem de classificação.Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order.
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
Parâmetros
- other
- Object
O objeto a ser comparado com a instância atual.The object to compare with the current instance.
- comparer
- IComparer
Um objeto que compara o objeto atual e other.An object that compares the current object and other.
Retornos
Um inteiro que indica a relação do objeto da coleção atual para outro, conforme mostrado na tabela a seguir.An integer that indicates the relationship of the current collection object to other, as shown in the following table.
| Valor retornadoReturn value | DescriçãoDescription |
|---|---|
| -1-1 | A instância atual precede other.The current instance precedes other.
|
| 00 | A instância atual e other são iguais.The current instance and other are equal.
|
| 11 | A instância atual segue other.The current instance follows other.
|
Implementações
Comentários
Este membro é uma implementação do membro de interface explícita.This member is an explicit interface member implementation. Ele só pode ser usado quando a instância de Array é convertida em uma interface de IStructuralComparable.It can be used only when the Array instance is cast to an IStructuralComparable interface.