Single.IComparable.CompareTo(Object) Metodo
Definizione
Confronta l'istanza corrente con un altro oggetto dello stesso tipo e restituisce un intero che indica se l'istanza corrente precede, segue o si trova nella stessa posizione dell'altro oggetto all'interno dell'ordinamento.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
Parametri
- value
- Object
Oggetto da confrontare.The object to compare.
Restituisce
Valore che indica l'ordine relativo degli oggetti confrontati.A value that indicates the relative order of the objects being compared.
Implementazioni
Commenti
Questo membro è un’implementazione esplicita di un membro di interfaccia.This member is an explicit interface member implementation. Può essere utilizzato solo quando si esegue il cast dell'istanza Single a un'interfaccia IComparable.It can be used only when the Single instance is cast to an IComparable interface.
Il valore restituito ha i seguenti significati:The return value has these meanings:
ValoreValue | SignificatoMeaning |
---|---|
Minore di zeroLess than zero | Questa istanza precede value nell'ordinamento.This instance precedes value in the sort order. |
ZeroZero | Questa istanza si presenta nella stessa posizione di value all'interno dell'ordinamento.This instance occurs in the same position in the sort order as value . |
Maggiore di zeroGreater than zero | Questa istanza segue value nei criteri di ordinamento.This instance follows value in the sort order. |