Double Constructors
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.
Overloads
| Double(Double) |
Constructs a newly allocated |
| Double(String) |
Constructs a newly allocated |
Double(Double)
Constructs a newly allocated Double object that
represents the primitive double argument.
[Android.Runtime.Register(".ctor", "(D)V", "")]
public Double(double value);
[<Android.Runtime.Register(".ctor", "(D)V", "")>]
new Java.Lang.Double : double -> Java.Lang.Double
Parameters
- value
- Double
the value to be represented by the Double.
- Attributes
Remarks
Constructs a newly allocated Double object that represents the primitive double argument.
This member is deprecated. It is rarely appropriate to use this constructor. The static factory #valueOf(double) is generally a better choice, as it is likely to yield significantly better space and time performance.
Java documentation for java.lang.Double.Double(double).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Double(String)
Constructs a newly allocated Double object that
represents the floating-point value of type double
represented by the string.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public Double(string s);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Lang.Double : string -> Java.Lang.Double
Parameters
- s
- String
a string to be converted to a Double.
- Attributes
Exceptions
if string cannot be parsed as a double value.
Remarks
Constructs a newly allocated Double object that represents the floating-point value of type double represented by the string. The string is converted to a double value as if by the valueOf method.
This member is deprecated. It is rarely appropriate to use this constructor. Use #parseDouble(String) to convert a string to a double primitive, or use #valueOf(String) to convert a string to a Double object.
Java documentation for java.lang.Double.Double(java.lang.String).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.