12 [__DynamicallyInvokable]
15 internal double m_value;
18 [__DynamicallyInvokable]
19 public const double MinValue = -1.7976931348623157E+308;
22 [__DynamicallyInvokable]
23 public const double MaxValue = 1.7976931348623157E+308;
26 [__DynamicallyInvokable]
27 public const double Epsilon = 4.94065645841247E-324;
30 [__DynamicallyInvokable]
34 [__DynamicallyInvokable]
38 [__DynamicallyInvokable]
39 public const double NaN = 0.0 / 0.0;
47 [SecuritySafeCritical]
49 [__DynamicallyInvokable]
52 return (*(
long*)(&d) &
long.
MaxValue) == 9218868437227405312
L;
60 [__DynamicallyInvokable]
75 [__DynamicallyInvokable]
85 [SecuritySafeCritical]
86 internal unsafe
static bool IsNegative(
double d)
88 return (*(
long*)(&d) &
long.
MinValue) ==
long.MinValue;
95 [ReliabilityContract(
Consistency.WillNotCorruptState,
Cer.Success)]
96 [SecuritySafeCritical]
98 [__DynamicallyInvokable]
99 public unsafe
static bool IsNaN(
double d)
101 return (ulong)(*(
long*)(&d) &
long.MaxValue) > 9218868437227405312uL;
118 double num = (double)value;
147 [__DynamicallyInvokable]
177 [__DynamicallyInvokable]
180 if (!(obj is
double))
184 double num = (double)obj;
202 [__DynamicallyInvokable]
205 return left == right;
214 [__DynamicallyInvokable]
217 return left != right;
226 [__DynamicallyInvokable]
238 [__DynamicallyInvokable]
250 [__DynamicallyInvokable]
253 return left <= right;
262 [__DynamicallyInvokable]
265 return left >= right;
272 [__DynamicallyInvokable]
288 [SecuritySafeCritical]
289 [__DynamicallyInvokable]
297 long num2 = *(
long*)(&num);
298 return (
int)num2 ^ (int)(num2 >> 32);
303 [SecuritySafeCritical]
304 [__DynamicallyInvokable]
315 [SecuritySafeCritical]
316 [__DynamicallyInvokable]
325 [SecuritySafeCritical]
326 [__DynamicallyInvokable]
336 [SecuritySafeCritical]
337 [__DynamicallyInvokable]
352 [__DynamicallyInvokable]
353 public static double Parse(
string s)
371 [__DynamicallyInvokable]
388 [__DynamicallyInvokable]
408 [__DynamicallyInvokable]
417 return Number.ParseDouble(s, style, info);
425 [__DynamicallyInvokable]
426 public static bool TryParse(
string s, out
double result)
441 [__DynamicallyInvokable]
455 if (!Number.TryParseDouble(s, style, info, out result))
457 string text = s.Trim();
458 if (text.Equals(info.PositiveInfinitySymbol))
460 result =
double.PositiveInfinity;
462 else if (text.Equals(info.NegativeInfinitySymbol))
464 result =
double.NegativeInfinity;
468 if (!text.Equals(info.NaNSymbol))
489 [__DynamicallyInvokable]
499 [__DynamicallyInvokable]
508 [__DynamicallyInvokable]
517 [__DynamicallyInvokable]
526 [__DynamicallyInvokable]
535 [__DynamicallyInvokable]
544 [__DynamicallyInvokable]
553 [__DynamicallyInvokable]
562 [__DynamicallyInvokable]
571 [__DynamicallyInvokable]
580 [__DynamicallyInvokable]
589 [__DynamicallyInvokable]
598 [__DynamicallyInvokable]
608 [__DynamicallyInvokable]
618 [__DynamicallyInvokable]
621 return Convert.DefaultToType(
this, type, provider);
float ToSingle(IFormatProvider provider)
Converts the value of this instance to an equivalent single-precision floating-point number using the...
Converts a base data type to another base data type.
static bool IsNegativeInfinity(double d)
Returns a value indicating whether the specified number evaluates to negative infinity.
static long ToInt64(object value)
Converts the value of the specified object to a 64-bit signed integer.
string ToString(string format, IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
static double Parse(string s, IFormatProvider provider)
Converts the string representation of a number in a specified culture-specific format to its double-p...
double ToDouble(IFormatProvider provider)
Converts the value of this instance to an equivalent double-precision floating-point number using the...
bool ToBoolean(IFormatProvider provider)
Converts the value of this instance to an equivalent Boolean value using the specified culture-specif...
TypeCode
Specifies the type of an object.
static float ToSingle(object value)
Converts the value of the specified object to a single-precision floating-point number.
static bool TryParse(string s, out double result)
Converts the string representation of a number to its double-precision floating-point number equivale...
static double Parse(string s)
Converts the string representation of a number to its double-precision floating-point number equivale...
static bool operator==(double left, double right)
Returns a value that indicates whether two specified T:System.Double values are equal.
string ToString(IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
The exception that is thrown for invalid casting or explicit conversion.
const double PositiveInfinity
Represents positive infinity. This field is constant.
char ToChar(IFormatProvider provider)
Converts the value of this instance to an equivalent Unicode character using the specified culture-sp...
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
const double MaxValue
Represents the largest possible value of a T:System.Double. This field is constant.
DateTime ToDateTime(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.DateTime using the specified culture-sp...
static unsafe bool IsNaN(double d)
Returns a value that indicates whether the specified value is not a number (F:System....
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 it...
sbyte ToSByte(IFormatProvider provider)
Converts the value of this instance to an equivalent 8-bit signed integer using the specified culture...
string ToString(string format)
Converts the numeric value of this instance to its equivalent string representation,...
Defines a generalized type-specific comparison method that a value type or class implements to order ...
NumberStyles
Determines the styles permitted in numeric string arguments that are passed to the Parse and TryParse...
static bool operator<(double left, double right)
Returns a value that indicates whether a specified T:System.Double value is less than another specifi...
Cer
Specifies a method's behavior when called within a constrained execution region.
const double NegativeInfinity
Represents negative infinity. This field is constant.
Represents a double-precision floating-point number.
Provides information about, and means to manipulate, the current environment and platform....
static bool ToBoolean(object value)
Converts the value of a specified object to an equivalent Boolean value.
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 ano...
decimal ToDecimal(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.Decimal number using the specified cult...
const double Epsilon
Represents the smallest positive T:System.Double value that is greater than zero. This field is const...
TypeCode GetTypeCode()
Returns the T:System.TypeCode for value type T:System.Double.
int ToInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit signed integer using the specified cultur...
bool Equals(double obj)
Returns a value indicating whether this instance and a specified T:System.Double object represent the...
const double NaN
Represents a value that is not a number (NaN). This field is constant.
unsafe override int GetHashCode()
Returns the hash code for this instance.
static ushort ToUInt16(object value)
Converts the value of the specified object to a 16-bit unsigned integer.
object ToType(Type conversionType, IFormatProvider provider)
Converts the value of this instance to an T:System.Object of the specified T:System....
static sbyte ToSByte(object value)
Converts the value of the specified object to an 8-bit signed integer.
Converts base data types to an array of bytes, and an array of bytes to base data types.
Represents type declarations: class types, interface types, array types, value types,...
ushort ToUInt16(IFormatProvider provider)
Converts the value of this instance to an equivalent 16-bit unsigned integer using the specified cult...
static bool operator !=(double left, double right)
Returns a value that indicates whether two specified T:System.Double values are not equal.
static uint ToUInt32(object value)
Converts the value of the specified object to a 32-bit unsigned integer.
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 it...
static double Parse(string s, NumberStyles style)
Converts the string representation of a number in a specified style to its double-precision floating-...
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 ...
short ToInt16(IFormatProvider provider)
Converts the value of this instance to an equivalent 16-bit signed integer using the specified cultur...
static decimal ToDecimal(object value)
Converts the value of the specified object to an equivalent decimal number.
long ToInt64(IFormatProvider provider)
Converts the value of this instance to an equivalent 64-bit signed integer using the specified cultur...
The exception that is thrown when one of the arguments provided to a method is not valid.
int CompareTo(double value)
Compares this instance to a specified double-precision floating-point number and returns an integer t...
int CompareTo(object value)
Compares this instance to a specified object and returns an integer that indicates whether the value ...
static byte ToByte(object value)
Converts the value of the specified object to an 8-bit unsigned integer.
Defines a generalized method that a value type or class implements to create a type-specific method f...
override bool Equals(object obj)
Returns a value indicating whether this instance is equal to a specified object.
override string ToString()
Converts the numeric value of this instance to its equivalent string representation.
static bool IsPositiveInfinity(double d)
Returns a value indicating whether the specified number evaluates to positive infinity.
static short ToInt16(object value)
Converts the value of the specified object to a 16-bit signed integer.
Specifies that the class can be serialized.
static bool operator >(double left, double right)
Returns a value that indicates whether a specified T:System.Double value is greater than another spec...
static unsafe bool IsInfinity(double d)
Returns a value indicating whether the specified number evaluates to negative or positive infinity
Consistency
Specifies a reliability contract.
ulong ToUInt64(IFormatProvider provider)
Converts the value of this instance to an equivalent 64-bit unsigned integer using the specified cult...
static ulong ToUInt64(object value)
Converts the value of the specified object to a 64-bit unsigned integer.
static int ToInt32(object value)
Converts the value of the specified object to a 32-bit signed integer.
byte ToByte(IFormatProvider provider)
Converts the value of this instance to an equivalent 8-bit unsigned integer using the specified cultu...
Defines methods that convert the value of the implementing reference or value type to a common langua...
const double MinValue
Represents the smallest possible value of a T:System.Double. This field is constant.
static unsafe double Int64BitsToDouble(long value)
Converts the specified 64-bit signed integer to a double-precision floating point number.
uint ToUInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified cult...