nfloat Struct
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.
Native floating point (single precision on 32-bit platforms, double precision on 64-bit platforms)
[System.Serializable]
public struct nfloat : IComparable, IComparable<nfloat>, IConvertible, IEquatable<nfloat>, IFormattable
type nfloat = struct
interface IFormattable
interface IConvertible
- Inheritance
-
nfloat
- Attributes
- Implements
Remarks
This data type is a floating point value that uses the natural size of the host architecture to store its value. On 32-bit systems, this uses T:System.Single for storage and on 64-bit systems it uses T:System.Double for storage.
As an optimization, the compiler and runtime have special knowledge of this data type, so while there is no dedicated set of IL instructions to deal with variable-size floating point values, the runtime will transform uses of nfloat into their native underlying representation transparently.
This type is defined in lowercase because it makes it feel like a C# data type when used in C# source code.
Constructors
nfloat(Double) |
Initializes an nfloat from a double value. On 32 bit platforms, this might be a lossy initialization. |
nfloat(Single) |
Initializes an nfloat from a float value. |
Fields
Epsilon |
Represents the smallest positive nfloat value that is greater than zero. This field is constant. |
MaxValue |
Represents the largest possible value of a nfloat. This field is constant. |
MinValue |
Represents the smallest possible value of a T:System.Double. This field is constant. |
NaN | |
NegativeInfinity | |
PositiveInfinity | |
Size |
Methods
CompareTo(nfloat) |
Compares this instance to a specified nfloat 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 nfloat floating-point number. |
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. |
CopyArray(IntPtr, nfloat[], Int32, Int32) | |
CopyArray(nfloat[], Int32, IntPtr, Int32) | |
Equals(nfloat) |
Returns a value indicating whether this instance and a specified nfloat object represent the same value. |
Equals(Object) |
Returns a value indicating whether this instance is equal to a specified object. |
GetHashCode() | |
GetTypeCode() |
Returns the T:System.TypeCode for the underlying storage on this platform, either the typecode for T:System.Double or the typecode for T:System.Single. |
IsInfinity(nfloat) |
Returns a value indicating whether the specified number evaluates to negative or positive infinity. |
IsNaN(nfloat) |
Returns a value that indicates whether the specified value is not a number (NaN). |
IsNegativeInfinity(nfloat) | |
IsPositiveInfinity(nfloat) | |
Parse(String, IFormatProvider) |
Converts the string representation of a number in a specified culture-specific format to its double-precision floating-point number equivalent. |
Parse(String, NumberStyles, IFormatProvider) | |
Parse(String, NumberStyles) | |
Parse(String) |
Converts the string representation of a number to its double-precision floating-point number equivalent. |
ToString() | |
ToString(IFormatProvider) | |
ToString(String, IFormatProvider) | |
ToString(String) | |
TryParse(String, nfloat) | |
TryParse(String, NumberStyles, IFormatProvider, nfloat) |