mscorlib(4.0.0.0) API with additions
System.Single Struct Reference

Represents a single-precision floating-point number. More...

Inheritance diagram for System.Single:
[legend]
Collaboration diagram for System.Single:
[legend]

Public Member Functions

int CompareTo (object value)
 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. More...
 
int CompareTo (float value)
 Compares this instance to a specified single-precision 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 single-precision floating-point number. More...
 
override bool Equals (object obj)
 Returns a value indicating whether this instance is equal to a specified object. More...
 
bool Equals (float obj)
 Returns a value indicating whether this instance and a specified T:System.Single object represent the same value. More...
 
unsafe override int GetHashCode ()
 Returns the hash code for this instance. More...
 
override string ToString ()
 Converts the numeric value of this instance to its equivalent string representation. More...
 
string ToString (IFormatProvider provider)
 Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. More...
 
string ToString (string format)
 Converts the numeric value of this instance to its equivalent string representation, using the specified format. More...
 
string ToString (string format, IFormatProvider provider)
 Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. More...
 
TypeCode GetTypeCode ()
 Returns the T:System.TypeCode for value type T:System.Single. More...
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider). More...
 
char IConvertible. ToChar (IFormatProvider provider)
 This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More...
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider). More...
 
byte IConvertible. ToByte (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider). More...
 
short IConvertible. ToInt16 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider). More...
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider). More...
 
int IConvertible. ToInt32 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider). More...
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToUInt32(System.IFormatProvider). More...
 
long IConvertible. ToInt64 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider). More...
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToUInt64(System.IFormatProvider). More...
 
float IConvertible. ToSingle (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider). More...
 
double IConvertible. ToDouble (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider). More...
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider). More...
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More...
 
object IConvertible. ToType (Type type, IFormatProvider provider)
 For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider). More...
 
- Public Member Functions inherited from System.IEquatable< float >
bool Equals (T other)
 Indicates whether the current object is equal to another object of the same type. More...
 

Static Public Member Functions

static unsafe bool IsInfinity (float f)
 Returns a value indicating whether the specified number evaluates to negative or positive infinity. More...
 
static unsafe bool IsPositiveInfinity (float f)
 Returns a value indicating whether the specified number evaluates to positive infinity. More...
 
static unsafe bool IsNegativeInfinity (float f)
 Returns a value indicating whether the specified number evaluates to negative infinity. More...
 
static unsafe bool IsNaN (float f)
 Returns a value that indicates whether the specified value is not a number (F:System.Single.NaN). More...
 
static bool operator== (float left, float right)
 Returns a value that indicates whether two specified T:System.Single values are equal. More...
 
static bool operator != (float left, float right)
 Returns a value that indicates whether two specified T:System.Single values are not equal. More...
 
static bool operator< (float left, float right)
 Returns a value that indicates whether a specified T:System.Single value is less than another specified T:System.Single value. More...
 
static bool operator > (float left, float right)
 Returns a value that indicates whether a specified T:System.Single value is greater than another specified T:System.Single value. More...
 
static bool operator<= (float left, float right)
 Returns a value that indicates whether a specified T:System.Single value is less than or equal to another specified T:System.Single value. More...
 
static bool operator >= (float left, float right)
 Returns a value that indicates whether a specified T:System.Single value is greater than or equal to another specified T:System.Single value. More...
 
static float Parse (string s)
 Converts the string representation of a number to its single-precision floating-point number equivalent. More...
 
static float Parse (string s, NumberStyles style)
 Converts the string representation of a number in a specified style to its single-precision floating-point number equivalent. More...
 
static float Parse (string s, IFormatProvider provider)
 Converts the string representation of a number in a specified culture-specific format to its single-precision floating-point number equivalent. More...
 
static float Parse (string s, NumberStyles style, IFormatProvider provider)
 Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent. More...
 
static bool TryParse (string s, out float result)
 Converts the string representation of a number to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. More...
 
static bool TryParse (string s, NumberStyles style, IFormatProvider provider, out float result)
 Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. More...
 

Public Attributes

internal float m_value
 
const float MinValue = -3.40282347E+38f
 Represents the smallest possible value of T:System.Single. This field is constant. More...
 
const float Epsilon = 1.401298E-45f
 Represents the smallest positive T:System.Single value that is greater than zero. This field is constant. More...
 
const float MaxValue = 3.40282347E+38f
 Represents the largest possible value of T:System.Single. This field is constant. More...
 
const float PositiveInfinity = 1f / 0f
 Represents positive infinity. This field is constant. More...
 
const float NegativeInfinity = -1f / 0f
 Represents negative infinity. This field is constant. More...
 
const float NaN = 0f / 0f
 Represents not a number (NaN). This field is constant. More...
 

Detailed Description

Represents a single-precision floating-point number.

Definition at line 13 of file Single.cs.

Member Function Documentation

◆ CompareTo() [1/2]

int System.Single.CompareTo ( object  value)

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.

Parameters
valueAn object to compare, or null.
Returns
A signed number indicating the relative values of this instance and value .Return Value Description Less than zero This instance is less than value .-or- This instance is not a number (F:System.Single.NaN) and value is a number. Zero This instance is equal to value .-or- This instance and value are both not a number (F:System.Single.NaN), F:System.Single.PositiveInfinity, or F:System.Single.NegativeInfinity. Greater than zero This instance is greater than value .-or- This instance is a number and value is not a number (F:System.Single.NaN).-or- value is null.
Exceptions
T:System.ArgumentExceptionvalue is not a T:System.Single.

Definition at line 96 of file Single.cs.

◆ CompareTo() [2/2]

int System.Single.CompareTo ( float  value)

Compares this instance to a specified single-precision 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 single-precision floating-point number.

Parameters
valueA single-precision floating-point number to compare.
Returns
A signed number indicating the relative values of this instance and value .Return Value Description Less than zero This instance is less than value .-or- This instance is not a number (F:System.Single.NaN) and value is a number. Zero This instance is equal to value .-or- Both this instance and value are not a number (F:System.Single.NaN), F:System.Single.PositiveInfinity, or F:System.Single.NegativeInfinity. Greater than zero This instance is greater than value .-or- This instance is a number and value is not a number (F:System.Single.NaN).

Definition at line 134 of file Single.cs.

◆ Equals() [1/2]

override bool System.Single.Equals ( object  obj)

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

Parameters
objAn object to compare with this instance.
Returns
true if obj is an instance of T:System.Single and equals the value of this instance; otherwise, false.

Definition at line 236 of file Single.cs.

◆ Equals() [2/2]

bool System.Single.Equals ( float  obj)

Returns a value indicating whether this instance and a specified T:System.Single object represent the same value.

Parameters
objAn object to compare with this instance.
Returns
true if obj is equal to this instance; otherwise, false.

Definition at line 259 of file Single.cs.

◆ GetHashCode()

unsafe override int System.Single.GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer hash code.

Definition at line 276 of file Single.cs.

◆ GetTypeCode()

TypeCode System.Single.GetTypeCode ( )

Returns the T:System.TypeCode for value type T:System.Single.

Returns
The enumerated constant, F:System.TypeCode.Single.

Implements System.IConvertible.

Definition at line 465 of file Single.cs.

◆ IsInfinity()

static unsafe bool System.Single.IsInfinity ( float  f)
static

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

Parameters
fA single-precision floating-point number.
Returns
true if f evaluates to F:System.Single.PositiveInfinity or F:System.Single.NegativeInfinity; otherwise, false.

Definition at line 48 of file Single.cs.

◆ IsNaN()

static unsafe bool System.Single.IsNaN ( float  f)
static

Returns a value that indicates whether the specified value is not a number (F:System.Single.NaN).

Parameters
fA single-precision floating-point number.
Returns
true if f evaluates to not a number (F:System.Single.NaN); otherwise, false.

Definition at line 85 of file Single.cs.

◆ IsNegativeInfinity()

static unsafe bool System.Single.IsNegativeInfinity ( float  f)
static

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

Parameters
fA single-precision floating-point number.
Returns
true if f evaluates to F:System.Single.NegativeInfinity; otherwise, false.

Definition at line 72 of file Single.cs.

◆ IsPositiveInfinity()

static unsafe bool System.Single.IsPositiveInfinity ( float  f)
static

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

Parameters
fA single-precision floating-point number.
Returns
true if f evaluates to F:System.Single.PositiveInfinity; otherwise, false.

Definition at line 60 of file Single.cs.

◆ operator !=()

static bool System.Single.operator != ( float  left,
float  right 
)
static

Returns a value that indicates whether two specified T:System.Single values are not equal.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left and right are not equal; otherwise, false.

Definition at line 178 of file Single.cs.

◆ operator >()

static bool System.Single.operator > ( float  left,
float  right 
)
static

Returns a value that indicates whether a specified T:System.Single value is greater than another specified T:System.Single value.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left is greater than right ; otherwise, false.

Definition at line 202 of file Single.cs.

◆ operator >=()

static bool System.Single.operator >= ( float  left,
float  right 
)
static

Returns a value that indicates whether a specified T:System.Single value is greater than or equal to another specified T:System.Single value.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left is greater than or equal to right ; otherwise, false.

Definition at line 226 of file Single.cs.

◆ operator<()

static bool System.Single.operator< ( float  left,
float  right 
)
static

Returns a value that indicates whether a specified T:System.Single value is less than another specified T:System.Single value.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left is less than right ; otherwise, false.

Definition at line 190 of file Single.cs.

◆ operator<=()

static bool System.Single.operator<= ( float  left,
float  right 
)
static

Returns a value that indicates whether a specified T:System.Single value is less than or equal to another specified T:System.Single value.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left is less than or equal to right ; otherwise, false.

Definition at line 214 of file Single.cs.

◆ operator==()

static bool System.Single.operator== ( float  left,
float  right 
)
static

Returns a value that indicates whether two specified T:System.Single values are equal.

Parameters
leftThe first value to compare.
rightThe second value to compare.
Returns
true if left and right are equal; otherwise, false.

Definition at line 166 of file Single.cs.

◆ Parse() [1/4]

static float System.Single.Parse ( string  s)
static

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

Parameters
sA string that contains a number to convert.
Returns
A single-precision floating-point number equivalent to the numeric value or symbol specified in s .
Exceptions
T:System.ArgumentNullExceptions is null.
T:System.FormatExceptions does not represent a number in a valid format.
T:System.OverflowExceptions represents a number less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 338 of file Single.cs.

◆ Parse() [2/4]

static float System.Single.Parse ( string  s,
NumberStyles  style 
)
static

Converts the string representation of a number in a specified style to its single-precision floating-point number equivalent.

Parameters
sA string that contains a number to convert.
styleA bitwise combination of enumeration values that indicates the style elements that can be present in s . A typical value to specify is F:System.Globalization.NumberStyles.Float combined with F:System.Globalization.NumberStyles.AllowThousands.
Returns
A single-precision floating-point number that is equivalent to the numeric value or symbol specified in s .
Exceptions
T:System.ArgumentNullExceptions is null.
T:System.FormatExceptions is not a number in a valid format.
T:System.OverflowExceptions represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.
T:System.ArgumentExceptionstyle is not a T:System.Globalization.NumberStyles value. -or- style includes the F:System.Globalization.NumberStyles.AllowHexSpecifier value.

Definition at line 357 of file Single.cs.

◆ Parse() [3/4]

static float System.Single.Parse ( string  s,
IFormatProvider  provider 
)
static

Converts the string representation of a number in a specified culture-specific format to its single-precision floating-point number equivalent.

Parameters
sA string that contains a number to convert.
providerAn object that supplies culture-specific formatting information about s .
Returns
A single-precision floating-point number equivalent to the numeric value or symbol specified in s .
Exceptions
T:System.ArgumentNullExceptions is null.
T:System.FormatExceptions does not represent a number in a valid format.
T:System.OverflowExceptions represents a number less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 374 of file Single.cs.

◆ Parse() [4/4]

static float System.Single.Parse ( string  s,
NumberStyles  style,
IFormatProvider  provider 
)
static

Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent.

Parameters
sA string that contains a number to convert.
styleA bitwise combination of enumeration values that indicates the style elements that can be present in s . A typical value to specify is F:System.Globalization.NumberStyles.Float combined with F:System.Globalization.NumberStyles.AllowThousands.
providerAn object that supplies culture-specific formatting information about s .
Returns
A single-precision floating-point number equivalent to the numeric value or symbol specified in s .
Exceptions
T:System.ArgumentNullExceptions is null.
T:System.FormatExceptions does not represent a numeric value.
T:System.ArgumentExceptionstyle is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value.
T:System.OverflowExceptions represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 394 of file Single.cs.

◆ ToBoolean()

bool IConvertible. System.Single.ToBoolean ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
true if the value of the current instance is not zero; otherwise, false.

Implements System.IConvertible.

Definition at line 475 of file Single.cs.

◆ ToByte()

byte IConvertible. System.Single.ToByte ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.Byte.

Implements System.IConvertible.

Definition at line 503 of file Single.cs.

◆ ToChar()

char IConvertible. System.Single.ToChar ( IFormatProvider  provider)

This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.

Parameters
providerThis parameter is ignored.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionIn all cases.

Implements System.IConvertible.

Definition at line 485 of file Single.cs.

◆ ToDateTime()

DateTime IConvertible. System.Single.ToDateTime ( IFormatProvider  provider)

This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.

Parameters
providerThis parameter is ignored.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionIn all cases.

Implements System.IConvertible.

Definition at line 594 of file Single.cs.

◆ ToDecimal()

decimal IConvertible. System.Single.ToDecimal ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.Decimal.

Implements System.IConvertible.

Definition at line 584 of file Single.cs.

◆ ToDouble()

double IConvertible. System.Single.ToDouble ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.Double.

Implements System.IConvertible.

Definition at line 575 of file Single.cs.

◆ ToInt16()

short IConvertible. System.Single.ToInt16 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to an T:System.Int16.

Implements System.IConvertible.

Definition at line 512 of file Single.cs.

◆ ToInt32()

int IConvertible. System.Single.ToInt32 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to an T:System.Int32.

Implements System.IConvertible.

Definition at line 530 of file Single.cs.

◆ ToInt64()

long IConvertible. System.Single.ToInt64 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to an T:System.Int64.

Implements System.IConvertible.

Definition at line 548 of file Single.cs.

◆ ToSByte()

sbyte IConvertible. System.Single.ToSByte ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to an T:System.SByte.

Implements System.IConvertible.

Definition at line 494 of file Single.cs.

◆ ToSingle()

float IConvertible. System.Single.ToSingle ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, unchanged.

Implements System.IConvertible.

Definition at line 566 of file Single.cs.

◆ ToString() [1/4]

override string System.Single.ToString ( )

Converts the numeric value of this instance to its equivalent string representation.

Returns
The string representation of the value of this instance.

Definition at line 290 of file Single.cs.

◆ ToString() [2/4]

string System.Single.ToString ( IFormatProvider  provider)

Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.

Parameters
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of the value of this instance as specified by provider .

Implements System.IConvertible.

Definition at line 300 of file Single.cs.

◆ ToString() [3/4]

string System.Single.ToString ( string  format)

Converts the numeric value of this instance to its equivalent string representation, using the specified format.

Parameters
formatA numeric format string.
Returns
The string representation of the value of this instance as specified by format .
Exceptions
T:System.FormatExceptionformat is invalid.

Definition at line 312 of file Single.cs.

◆ ToString() [4/4]

string System.Single.ToString ( string  format,
IFormatProvider  provider 
)

Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.

Parameters
formatA numeric format string.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of the value of this instance as specified by format and provider .

Implements System.IFormattable.

Definition at line 323 of file Single.cs.

◆ ToType()

object IConvertible. System.Single.ToType ( Type  type,
IFormatProvider  provider 
)

For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider).

Parameters
typeThe type to which to convert this T:System.Single value.
providerAn object that supplies information about the format of the returned value.
Returns
The value of the current instance, converted to type .

Implements System.IConvertible.

Definition at line 604 of file Single.cs.

◆ ToUInt16()

ushort IConvertible. System.Single.ToUInt16 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.UInt16.

Implements System.IConvertible.

Definition at line 521 of file Single.cs.

◆ ToUInt32()

uint IConvertible. System.Single.ToUInt32 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToUInt32(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.UInt32.

Implements System.IConvertible.

Definition at line 539 of file Single.cs.

◆ ToUInt64()

ulong IConvertible. System.Single.ToUInt64 ( IFormatProvider  provider)

For a description of this member, see M:System.IConvertible.ToUInt64(System.IFormatProvider).

Parameters
providerThis parameter is ignored.
Returns
The value of the current instance, converted to a T:System.UInt64.

Implements System.IConvertible.

Definition at line 557 of file Single.cs.

◆ TryParse() [1/2]

static bool System.Single.TryParse ( string  s,
out float  result 
)
static

Converts the string representation of a number to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

Parameters
sA string representing a number to convert.
resultWhen this method returns, contains single-precision floating-point number equivalent to the numeric value or symbol contained in s , if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or F:System.String.Empty, is not a number in a valid format, or represents a number less than F:System.Single.MinValue or greater than F:System.Single.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.
Returns
true if s was converted successfully; otherwise, false.

Definition at line 411 of file Single.cs.

◆ TryParse() [2/2]

static bool System.Single.TryParse ( string  s,
NumberStyles  style,
IFormatProvider  provider,
out float  result 
)
static

Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

Parameters
sA string representing a number to convert.
styleA bitwise combination of enumeration values that indicates the permitted format of s . A typical value to specify is F:System.Globalization.NumberStyles.Float combined with F:System.Globalization.NumberStyles.AllowThousands.
providerAn object that supplies culture-specific formatting information about s .
resultWhen this method returns, contains the single-precision floating-point number equivalent to the numeric value or symbol contained in s , if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or F:System.String.Empty, is not in a format compliant with style , represents a number less than F:System.Single.MinValue or greater than F:System.Single.MaxValue, or if style is not a valid combination of T:System.Globalization.NumberStyles enumerated constants. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.
Returns
true if s was converted successfully; otherwise, false.
Exceptions
T:System.ArgumentExceptionstyle is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value.

Definition at line 427 of file Single.cs.

Member Data Documentation

◆ Epsilon

const float System.Single.Epsilon = 1.401298E-45f

Represents the smallest positive T:System.Single value that is greater than zero. This field is constant.

Definition at line 23 of file Single.cs.

◆ MaxValue

const float System.Single.MaxValue = 3.40282347E+38f

Represents the largest possible value of T:System.Single. This field is constant.

Definition at line 27 of file Single.cs.

◆ MinValue

const float System.Single.MinValue = -3.40282347E+38f

Represents the smallest possible value of T:System.Single. This field is constant.

Definition at line 19 of file Single.cs.

◆ NaN

const float System.Single.NaN = 0f / 0f

Represents not a number (NaN). This field is constant.

Definition at line 39 of file Single.cs.

◆ NegativeInfinity

const float System.Single.NegativeInfinity = -1f / 0f

Represents negative infinity. This field is constant.

Definition at line 35 of file Single.cs.

◆ PositiveInfinity

const float System.Single.PositiveInfinity = 1f / 0f

Represents positive infinity. This field is constant.

Definition at line 31 of file Single.cs.


The documentation for this struct was generated from the following file: