mscorlib(4.0.0.0) API with additions
|
Represents a double-precision floating-point number. More...
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 (double value) |
Compares this instance to a specified double-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 double-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 (double obj) |
Returns a value indicating whether this instance and a specified T:System.Double 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 (string format) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format. 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, 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.Double. 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... | |
![]() | |
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 (double d) |
Returns a value indicating whether the specified number evaluates to negative or positive infinity More... | |
static bool | IsPositiveInfinity (double d) |
Returns a value indicating whether the specified number evaluates to positive infinity. More... | |
static bool | IsNegativeInfinity (double d) |
Returns a value indicating whether the specified number evaluates to negative infinity. More... | |
internal static unsafe bool | IsNegative (double d) |
static unsafe bool | IsNaN (double d) |
Returns a value that indicates whether the specified value is not a number (F:System.Double.NaN). More... | |
static bool | operator== (double left, double right) |
Returns a value that indicates whether two specified T:System.Double values are equal. More... | |
static bool | operator != (double left, double right) |
Returns a value that indicates whether two specified T:System.Double values are not equal. More... | |
static bool | operator< (double left, double right) |
Returns a value that indicates whether a specified T:System.Double value is less than another specified T:System.Double value. More... | |
static bool | operator > (double left, double right) |
Returns a value that indicates whether a specified T:System.Double value is greater than another specified T:System.Double value. More... | |
static bool | operator<= (double left, double right) |
Returns a value that indicates whether a specified T:System.Double value is less than or equal to another specified T:System.Double value. More... | |
static bool | operator >= (double left, double right) |
Returns a value that indicates whether a specified T:System.Double value is greater than or equal to another specified T:System.Double value. More... | |
static double | Parse (string s) |
Converts the string representation of a number to its double-precision floating-point number equivalent. More... | |
static double | Parse (string s, NumberStyles style) |
Converts the string representation of a number in a specified style to its double-precision floating-point number equivalent. More... | |
static double | Parse (string s, IFormatProvider provider) |
Converts the string representation of a number in a specified culture-specific format to its double-precision floating-point number equivalent. More... | |
static double | Parse (string s, NumberStyles style, IFormatProvider provider) |
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. More... | |
static bool | TryParse (string s, out double result) |
Converts the string representation of a number to its double-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 double result) |
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. More... | |
Public Attributes | |
internal double | m_value |
const double | MinValue = -1.7976931348623157E+308 |
Represents the smallest possible value of a T:System.Double. This field is constant. More... | |
const double | MaxValue = 1.7976931348623157E+308 |
Represents the largest possible value of a T:System.Double. This field is constant. More... | |
const double | Epsilon = 4.94065645841247E-324 |
Represents the smallest positive T:System.Double value that is greater than zero. This field is constant. More... | |
const double | NegativeInfinity = -1.0 / 0.0 |
Represents negative infinity. This field is constant. More... | |
const double | PositiveInfinity = 1.0 / 0.0 |
Represents positive infinity. This field is constant. More... | |
const double | NaN = 0.0 / 0.0 |
Represents a value that is not a number (NaN ). This field is constant. More... | |
Static Public Attributes | |
static internal double | NegativeZero = BitConverter.Int64BitsToDouble(long.MinValue) |
int System.Double.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.
value | An object to compare, or null . |
Double.NaN
, F:System.Double.PositiveInfinity, or F:System.Double.NegativeInfinityA positive integer This instance is greater than value .-or- This instance is a number and value is not a number (F:System.Double.NaN).-or- value is null
. T:System.ArgumentException | value is not a T:System.Double. |
int System.Double.CompareTo | ( | double | value | ) |
Compares this instance to a specified double-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 double-precision floating-point number.
value | A double-precision floating-point number to compare. |
override bool System.Double.Equals | ( | object | obj | ) |
Returns a value indicating whether this instance is equal to a specified object.
obj | An object to compare with this instance. |
true
if obj is an instance of T:System.Double and equals the value of this instance; otherwise, false
.bool System.Double.Equals | ( | double | obj | ) |
Returns a value indicating whether this instance and a specified T:System.Double object represent the same value.
obj | A T:System.Double object to compare to this instance. |
true
if obj is equal to this instance; otherwise, false
.unsafe override int System.Double.GetHashCode | ( | ) |
TypeCode System.Double.GetTypeCode | ( | ) |
Returns the T:System.TypeCode for value type T:System.Double.
Implements System.IConvertible.
|
static |
Returns a value indicating whether the specified number evaluates to negative or positive infinity
d | A double-precision floating-point number. |
true
if d evaluates to F:System.Double.PositiveInfinity or F:System.Double.NegativeInfinity; otherwise, false
.
|
static |
|
static |
|
static |
|
static |
Returns a value that indicates whether two specified T:System.Double values are not equal.
left | The first value to compare. |
right | The second value to compare. |
true
if left and right are not equal; otherwise, false
.
|
static |
Returns a value that indicates whether a specified T:System.Double value is greater than another specified T:System.Double value.
left | The first value to compare. |
right | The second value to compare. |
true
if left is greater than right ; otherwise, false
.
|
static |
Returns a value that indicates whether a specified T:System.Double value is greater than or equal to another specified T:System.Double value.
left | The first value to compare. |
right | The second value to compare. |
true
if left is greater than or equal to right ; otherwise, false
.
|
static |
Returns a value that indicates whether a specified T:System.Double value is less than another specified T:System.Double value.
left | The first value to compare. |
right | The second value to compare. |
true
if left is less than right ; otherwise, false
.
|
static |
Returns a value that indicates whether a specified T:System.Double value is less than or equal to another specified T:System.Double value.
left | The first value to compare. |
right | The second value to compare. |
true
if left is less than or equal to right ; otherwise, false
.
|
static |
Returns a value that indicates whether two specified T:System.Double values are equal.
left | The first value to compare. |
right | The second value to compare. |
true
if left and right are equal; otherwise, false
.
|
static |
Converts the string representation of a number to its double-precision floating-point number equivalent.
s | A string that contains a number to convert. |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s does not represent a number in a valid format. |
T:System.OverflowException | s represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue. |
|
static |
Converts the string representation of a number in a specified style to its double-precision floating-point number equivalent.
s | A string that contains a number to convert. |
style | A bitwise combination of enumeration values that indicate the style elements that can be present in s . A typical value to specify is a combination of F:System.Globalization.NumberStyles.Float combined with F:System.Globalization.NumberStyles.AllowThousands. |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s does not represent a number in a valid format. |
T:System.OverflowException | s represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue. |
T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style includes the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
|
static |
Converts the string representation of a number in a specified culture-specific format to its double-precision floating-point number equivalent.
s | A string that contains a number to convert. |
provider | An object that supplies culture-specific formatting information about s . |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s does not represent a number in a valid format. |
T:System.OverflowException | s represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue. |
|
static |
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent.
s | A string that contains a number to convert. |
style | A bitwise combination of enumeration values that indicate 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. |
provider | An object that supplies culture-specific formatting information about s . |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s does not represent a numeric value. |
T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
T:System.OverflowException | s represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue. |
bool IConvertible. System.Double.ToBoolean | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider).
provider | This parameter is ignored. |
true
if the value of the current instance is not zero; otherwise, false
.Implements System.IConvertible.
byte IConvertible. System.Double.ToByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
char IConvertible. System.Double.ToChar | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.
provider | This parameter is ignored. |
T:System.InvalidCastException | In all cases. |
Implements System.IConvertible.
DateTime IConvertible. System.Double.ToDateTime | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException
provider | This parameter is ignored. |
T:System.InvalidCastException | In all cases. |
Implements System.IConvertible.
decimal IConvertible. System.Double.ToDecimal | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
double IConvertible. System.Double.ToDouble | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
short IConvertible. System.Double.ToInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
int IConvertible. System.Double.ToInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
long IConvertible. System.Double.ToInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
sbyte IConvertible. System.Double.ToSByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
float IConvertible. System.Double.ToSingle | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
override string System.Double.ToString | ( | ) |
string System.Double.ToString | ( | string | format | ) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format.
format | A numeric format string. |
T:System.FormatException | format is invalid. |
string System.Double.ToString | ( | IFormatProvider | provider | ) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
provider | An object that supplies culture-specific formatting information. |
Implements System.IConvertible.
string System.Double.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.
format | A numeric format string. |
provider | An object that supplies culture-specific formatting information. |
Implements System.IFormattable.
object IConvertible. System.Double.ToType | ( | Type | type, |
IFormatProvider | provider | ||
) |
For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider).
type | The type to which to convert this T:System.Double value. |
provider | An T:System.IFormatProvider implementation that supplies culture-specific information about the format of the returned value. |
Implements System.IConvertible.
ushort IConvertible. System.Double.ToUInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
uint IConvertible. System.Double.ToUInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt32(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
ulong IConvertible. System.Double.ToUInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt64(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
|
static |
Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.
s | A string containing a number to convert. |
result | When this method returns, contains the double-precision floating-point number equivalent of the s parameter, 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.Double.MinValue or greater than F:System.Double.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. |
true
if s was converted successfully; otherwise, false
.
|
static |
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.
s | A string containing a number to convert. |
style | A bitwise combination of T:System.Globalization.NumberStyles 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. |
provider | An T:System.IFormatProvider that supplies culture-specific formatting information about s . |
result | When this method returns, contains a double-precision floating-point number equivalent of 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.SByte.MinValue or greater than F:System.SByte.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. |
true
if s was converted successfully; otherwise, false
.T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style includes the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
const double System.Double.Epsilon = 4.94065645841247E-324 |
Represents the smallest positive T:System.Double value that is greater than zero. This field is constant.
const double System.Double.MaxValue = 1.7976931348623157E+308 |
Represents the largest possible value of a T:System.Double. This field is constant.
const double System.Double.MinValue = -1.7976931348623157E+308 |
Represents the smallest possible value of a T:System.Double. This field is constant.
const double System.Double.NaN = 0.0 / 0.0 |
const double System.Double.NegativeInfinity = -1.0 / 0.0 |
const double System.Double.PositiveInfinity = 1.0 / 0.0 |