Double.IComparable.CompareTo(Object) Método
Definição
Compara a instância atual com outro objeto do mesmo tipo e retorna um inteiro que indica se a instância atual precede, segue ou ocorre na mesma posição da ordem de classificação do outro objeto.Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
virtual int System.IComparable.CompareTo(System::Object ^ value) = IComparable::CompareTo;
int IComparable.CompareTo (object value);
abstract member System.IComparable.CompareTo : obj -> int
override this.System.IComparable.CompareTo : obj -> int
Function CompareTo (value As Object) As Integer Implements IComparable.CompareTo
Parâmetros
- value
- Object
O objeto a ser comparado.The object to compare.
Retornos
Um valor que indica a ordem relativa dos objetos que estão sendo comparados.A value that indicates the relative order of the objects being compared.
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 Double é convertida em uma interface de IComparable.It can be used only when the Double instance is cast to an IComparable interface.
O valor retornado tem estes significados:The return value has these meanings:
| ValorValue | SignificadoMeaning |
|---|---|
| Menor que zeroLess than zero | Esta instância precede value na ordem de classificação.This instance precedes value in the sort order. |
| ZeroZero | Esta instância ocorre na mesma posição que value na ordem de classificação.This instance occurs in the same position in the sort order as value. |
| Maior que zeroGreater than zero | Esta instância segue value na ordem de classificação.This instance follows value in the sort order. |