NFloat.CompareTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CompareTo(Object) |
Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object. |
CompareTo(NFloat) |
Compares this instance to a specified floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified floating-point number. |
CompareTo(Object)
- Source:
- NFloat.cs
- Source:
- NFloat.cs
- Source:
- NFloat.cs
Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.
public:
virtual int CompareTo(System::Object ^ obj);
public int CompareTo (object? obj);
abstract member CompareTo : obj -> int
override this.CompareTo : obj -> int
Public Function CompareTo (obj As Object) As Integer
Parameters
- obj
- Object
An object to compare, or null
.
Returns
A signed number indicating the relative values of this instance and obj
.
Return Value | Description |
---|---|
Less than zero | This instance is less than obj , or this instance is not a number and obj is a number. |
Zero | This instance is equal to obj , or both this instance and obj are not a number. |
Greater than zero | This instance is greater than obj , or this instance is a number and obj is not a number or obj is null . |
Implements
Exceptions
obj
is not a NFloat.
Applies to
CompareTo(NFloat)
- Source:
- NFloat.cs
- Source:
- NFloat.cs
- Source:
- NFloat.cs
Compares this instance to a specified floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified floating-point number.
public:
virtual int CompareTo(System::Runtime::InteropServices::NFloat other);
public int CompareTo (System.Runtime.InteropServices.NFloat other);
abstract member CompareTo : System.Runtime.InteropServices.NFloat -> int
override this.CompareTo : System.Runtime.InteropServices.NFloat -> int
Public Function CompareTo (other As NFloat) As Integer
Parameters
- other
- NFloat
A floating-point number to compare.
Returns
A signed number indicating the relative values of this instance and other
.
Return Value | Description |
---|---|
Less than zero | This instance is less than other , or this instance is not a number and other is a number. |
Zero | This instance is equal to other , or both this instance and other are not a number. |
Greater than zero | This instance is greater than other , or this instance is a number and other is not a number. |