Double.toString from Java to C#

D

Dan

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"
 
C

Christof Nordiek

Dan said:
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"

Maybe:
new Double(4).ToString("F1")

Depending on the exact behaviour of Double.toString() in Java.

Christof
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top