What is the equivalent of Double.toString from Java in C#
In Java
new Double(4).toString() = "4.0"
but in C#
new Double(4).ToString() = "4"
Christof Nordiek - 29 Jun 2007 12:21 GMT
> What is the equivalent of Double.toString from Java in C#
>
[quoted text clipped - 4 lines]
>
> new Double(4).ToString() = "4"
Maybe:
new Double(4).ToString("F1")
Depending on the exact behaviour of Double.toString() in Java.
Christof
Maate - 29 Jun 2007 12:33 GMT
Something regarding formatting
http://msdn2.microsoft.com/en-us/library/dwhawy9k.aspx
http://msdn2.microsoft.com/en-us/library/0c899ak8.aspx
/Morten