DateTimeOffset.IComparable.CompareTo(Object) Método

Definição

Compara o valor do objeto atual DateTimeOffset com outro objeto do mesmo tipo.Compares the value of the current DateTimeOffset object with another object of the same type.

 virtual int System.IComparable.CompareTo(System::Object ^ obj) = IComparable::CompareTo;
int IComparable.CompareTo (object obj);
abstract member System.IComparable.CompareTo : obj -> int
override this.System.IComparable.CompareTo : obj -> int
Function CompareTo (obj As Object) As Integer Implements IComparable.CompareTo

Parâmetros

obj
Object

O objeto a ser comparado com o objeto DateTimeOffset atual.The object to compare with the current DateTimeOffset object.

Retornos

Int32

Um inteiro com sinal de 32 bits que indica se o objeto DateTimeOffset atual é menor, igual ou maior que obj.A 32-bit signed integer that indicates whether the current DateTimeOffset object is less than, equal to, or greater than obj. Os valores retornados do método são interpretados da seguinte maneira:The return values of the method are interpreted as follows:

Valor de retornoReturn Value DescriçãoDescription
Menor que zeroLess than zero O objeto DateTimeOffset atual é menor do que (anterior a) obj.The current DateTimeOffset object is less than (earlier than) obj.
ZeroZero O objeto DateTimeOffset atual é igual a (o mesmo ponto no tempo que) obj.The current DateTimeOffset object is equal to (the same point in time as) obj.
Maior que zeroGreater than zero O objeto DateTimeOffset atual é maior do que (posterior a) obj.The current DateTimeOffset object is greater than (later than) obj.

Implementações

Aplica-se a