Double 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.
Represents a double-precision floating-point number.
public value class double : IComparable, IComparable<double>, IConvertible, IEquatable<double>, IFormattable
public value class double : IComparable, IConvertible, IFormattable
public value class double : IComparable, IComparable<double>, IEquatable<double>, IFormattable
public struct Double : IComparable, IComparable<double>, IConvertible, IEquatable<double>, IFormattable
[System.Serializable]
public struct Double : IComparable, IConvertible, IFormattable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Double : IComparable, IComparable<double>, IConvertible, IEquatable<double>, IFormattable
public struct Double : IComparable, IComparable<double>, IEquatable<double>, IFormattable
public readonly struct Double : IComparable, IComparable<double>, IConvertible, IEquatable<double>, IFormattable
type double = struct
interface IConvertible
interface IFormattable
[<System.Serializable>]
type double = struct
interface IFormattable
interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type double = struct
interface IFormattable
interface IConvertible
type double = struct
interface IFormattable
Public Structure Double
Implements IComparable, IComparable(Of Double), IConvertible, IEquatable(Of Double), IFormattable
Public Structure Double
Implements IComparable, IConvertible, IFormattable
Public Structure Double
Implements IComparable, IComparable(Of Double), IEquatable(Of Double), IFormattable
- Inheritance
- Attributes
- Implements
Remarks
For more information about this API, see Supplemental API remarks for Double.
Fields
| Name | Description |
|---|---|
| Epsilon |
Represents the smallest positive Double value that is greater than zero. This field is constant. |
| MaxValue |
Represents the largest possible value of a Double. This field is constant. |
| MinValue |
Represents the smallest possible value of a Double. This field is constant. |
| NaN |
Represents a value that is not a number ( |
| NegativeInfinity |
Represents negative infinity. This field is constant. |
| PositiveInfinity |
Represents positive infinity. This field is constant. |
Methods
| Name | Description |
|---|---|
| CompareTo(Double) |
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. |
| 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. |
| Equals(Double) |
Returns a value indicating whether this instance and a specified Double object represent the same value. |
| Equals(Object) |
Returns a value indicating whether this instance is equal to a specified object. |
| GetHashCode() |
Returns the hash code for this instance. |
| GetTypeCode() | |
| IsFinite(Double) |
Determines whether the specified value is finite (zero, subnormal, or normal). |
| IsInfinity(Double) |
Returns a value indicating whether the specified number evaluates to negative or positive infinity. |
| IsNaN(Double) |
Returns a value that indicates whether the specified value is not a number (NaN). |
| IsNegative(Double) |
Determines whether the specified value is negative. |
| IsNegativeInfinity(Double) |
Returns a value indicating whether the specified number evaluates to negative infinity. |
| IsNormal(Double) |
Determines whether the specified value is normal. |
| IsPositiveInfinity(Double) |
Returns a value indicating whether the specified number evaluates to positive infinity. |
| IsSubnormal(Double) |
Determines whether the specified value is subnormal. |
| Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Converts a character span that contains the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. |
| 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) |
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. |
| Parse(String, NumberStyles) |
Converts the string representation of a number in a specified style to its double-precision floating-point number equivalent. |
| Parse(String) |
Converts the string representation of a number to its double-precision floating-point number equivalent. |
| ToString() |
Converts the numeric value of this instance to its equivalent string representation. |
| ToString(IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
| ToString(String, IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
| ToString(String) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format. |
| TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tries to format the value of the current double instance into the provided span of characters. |
| TryParse(ReadOnlySpan<Char>, Double) |
Converts the span 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. |
| TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, Double) |
Converts a character span containing 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. |
| TryParse(String, Double) |
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. |
| TryParse(String, NumberStyles, IFormatProvider, Double) |
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. |
Operators
| Name | Description |
|---|---|
| Equality(Double, Double) |
Returns a value that indicates whether two specified Double values are equal. |
| GreaterThan(Double, Double) |
Returns a value that indicates whether a specified Double value is greater than another specified Double value. |
| GreaterThanOrEqual(Double, Double) |
Returns a value that indicates whether a specified Double value is greater than or equal to another specified Double value. |
| Inequality(Double, Double) |
Returns a value that indicates whether two specified Double values are not equal. |
| LessThan(Double, Double) |
Returns a value that indicates whether a specified Double value is less than another specified Double value. |
| LessThanOrEqual(Double, Double) |
Returns a value that indicates whether a specified Double value is less than or equal to another specified Double value. |
Explicit Interface Implementations
Applies to
Thread Safety
All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.