convert float/double

windows

Guest
I have a float or double variable.
I want the digits te appear in a label.
But I want 2 digits behind the comma.
If I just use the toString() method It will not give any digits behind the comma. Just 1 or 2 and not 1,35 or 2,69
What do i need to do?

thxdo u have code like that

Dim d As Double
d = 10 / 3
Label1.Text = d.ToString()Yep, I have some sort of code like that. I use C#

double size;

size = length / 1024;
lbl.text = size.toString();I think that this (<!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdoubleclasstostringtopic.asp">http://msdn.microsoft.com/library/defau ... gtopic.asp</a><!-- m -->) may help.
I didn't test it but I think that what you shoul do is something like:
Label1.Text = size.ToString("#.00");
 
Top