nfloat nfloat Struct

Definition

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
nfloatnfloat
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) nfloat(Double)

Initializes an nfloat from a double value.   On 32 bit platforms, this might be a lossy initialization.

nfloat(Single) nfloat(Single)

Initializes an nfloat from a float value.

Fields

Epsilon Epsilon

Represents the smallest positive nfloat value that is greater than zero. This field is constant.

MaxValue MaxValue

Represents the largest possible value of a nfloat. This field is constant.

MinValue MinValue

T:System.Double

NaN NaN
NegativeInfinity NegativeInfinity
PositiveInfinity PositiveInfinity
Size Size

Methods

CompareTo(nfloat) 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) 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(IntPtr, nfloat[], Int32, Int32)
CopyArray(nfloat[], Int32, IntPtr, Int32) CopyArray(nfloat[], Int32, IntPtr, Int32)
Equals(nfloat) Equals(nfloat)

Returns a value indicating whether this instance and a specified nfloat object represent the same value.

Equals(Object) Equals(Object)

Returns a value indicating whether this instance is equal to a specified object.

GetHashCode() GetHashCode()
GetTypeCode() 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) IsInfinity(nfloat)

Returns a value indicating whether the specified number evaluates to negative or positive infinity.

IsNaN(nfloat) IsNaN(nfloat)

Returns a value that indicates whether the specified value is not a number (NaN).

IsNegativeInfinity(nfloat) IsNegativeInfinity(nfloat)
IsPositiveInfinity(nfloat) IsPositiveInfinity(nfloat)
Parse(String) Parse(String)

Converts the string representation of a number to its double-precision floating-point number equivalent.

Parse(String, NumberStyles) Parse(String, NumberStyles)
Parse(String, IFormatProvider) 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, IFormatProvider)
ToString(String, IFormatProvider) ToString(String, IFormatProvider)
ToString(String) ToString(String)
ToString(IFormatProvider) ToString(IFormatProvider)
ToString() ToString()
TryParse(String, NumberStyles, IFormatProvider, nfloat) TryParse(String, NumberStyles, IFormatProvider, nfloat)
TryParse(String, nfloat) TryParse(String, nfloat)

Operators

Addition(nfloat, nfloat) Addition(nfloat, nfloat)
Decrement(nfloat) Decrement(nfloat)
Division(nfloat, nfloat) Division(nfloat, nfloat)
Equality(nfloat, nfloat) Equality(nfloat, nfloat)
Explicit(Decimal to nfloat) Explicit(Decimal to nfloat)
Explicit(nfloat to UInt64) Explicit(nfloat to UInt64)
Explicit(nfloat to UInt32) Explicit(nfloat to UInt32)
Explicit(nfloat to UInt16) Explicit(nfloat to UInt16)
Explicit(nfloat to Single) Explicit(nfloat to Single)
Explicit(nfloat to IntPtr) Explicit(nfloat to IntPtr)
Explicit(nfloat to Int64) Explicit(nfloat to Int64)
Explicit(nfloat to SByte) Explicit(nfloat to SByte)
Explicit(nfloat to Int16) Explicit(nfloat to Int16)
Explicit(nfloat to Decimal) Explicit(nfloat to Decimal)
Explicit(nfloat to Char) Explicit(nfloat to Char)
Explicit(nfloat to Byte) Explicit(nfloat to Byte)
Explicit(IntPtr to nfloat) Explicit(IntPtr to nfloat)
Explicit(Double to nfloat) Explicit(Double to nfloat)
Explicit(nfloat to Int32) Explicit(nfloat to Int32)
GreaterThan(nfloat, nfloat) GreaterThan(nfloat, nfloat)
GreaterThanOrEqual(nfloat, nfloat) GreaterThanOrEqual(nfloat, nfloat)
Implicit(Single to nfloat) Implicit(Single to nfloat)
Implicit(UInt64 to nfloat) Implicit(UInt64 to nfloat)
Implicit(UInt32 to nfloat) Implicit(UInt32 to nfloat)
Implicit(UInt16 to nfloat) Implicit(UInt16 to nfloat)
Implicit(SByte to nfloat) Implicit(SByte to nfloat)
Implicit(Int32 to nfloat) Implicit(Int32 to nfloat)
Implicit(Int64 to nfloat) Implicit(Int64 to nfloat)
Implicit(nfloat to Double) Implicit(nfloat to Double)
Implicit(Int16 to nfloat) Implicit(Int16 to nfloat)
Implicit(Char to nfloat) Implicit(Char to nfloat)
Implicit(Byte to nfloat) Implicit(Byte to nfloat)
Increment(nfloat) Increment(nfloat)
Inequality(nfloat, nfloat) Inequality(nfloat, nfloat)
LessThan(nfloat, nfloat) LessThan(nfloat, nfloat)
LessThanOrEqual(nfloat, nfloat) LessThanOrEqual(nfloat, nfloat)
Modulus(nfloat, nfloat) Modulus(nfloat, nfloat)
Multiply(nfloat, nfloat) Multiply(nfloat, nfloat)
Subtraction(nfloat, nfloat) Subtraction(nfloat, nfloat)
UnaryNegation(nfloat) UnaryNegation(nfloat)
UnaryPlus(nfloat) UnaryPlus(nfloat)

Explicit Interface Implementations

IConvertible.ToBoolean(IFormatProvider) IConvertible.ToBoolean(IFormatProvider)
IConvertible.ToByte(IFormatProvider) IConvertible.ToByte(IFormatProvider)
IConvertible.ToChar(IFormatProvider) IConvertible.ToChar(IFormatProvider)
IConvertible.ToDateTime(IFormatProvider) IConvertible.ToDateTime(IFormatProvider)
IConvertible.ToDecimal(IFormatProvider) IConvertible.ToDecimal(IFormatProvider)
IConvertible.ToDouble(IFormatProvider) IConvertible.ToDouble(IFormatProvider)
IConvertible.ToInt16(IFormatProvider) IConvertible.ToInt16(IFormatProvider)
IConvertible.ToInt32(IFormatProvider) IConvertible.ToInt32(IFormatProvider)
IConvertible.ToInt64(IFormatProvider) IConvertible.ToInt64(IFormatProvider)
IConvertible.ToSByte(IFormatProvider) IConvertible.ToSByte(IFormatProvider)
IConvertible.ToSingle(IFormatProvider) IConvertible.ToSingle(IFormatProvider)
IConvertible.ToType(Type, IFormatProvider) IConvertible.ToType(Type, IFormatProvider)
IConvertible.ToUInt16(IFormatProvider) IConvertible.ToUInt16(IFormatProvider)
IConvertible.ToUInt32(IFormatProvider) IConvertible.ToUInt32(IFormatProvider)
IConvertible.ToUInt64(IFormatProvider) IConvertible.ToUInt64(IFormatProvider)

Applies to