I have the following code:
Dim x As Double = 45.333
Dim y As Double = 45
Dim z As Double = x - y
Me.Label1.Text = z.ToString()
The result should obviously be 0.333, but the value displayed in
Me.Label1.Text is:
0.3329999999999 98
I have seen stuff like this in other situations, but I never managed to
figure out how to fix it. Can somebody help me here?
--
Nathan Sokalski
njsokalski@hotm ail.com
Dim x As Double = 45.333
Dim y As Double = 45
Dim z As Double = x - y
Me.Label1.Text = z.ToString()
The result should obviously be 0.333, but the value displayed in
Me.Label1.Text is:
0.3329999999999 98
I have seen stuff like this in other situations, but I never managed to
figure out how to fix it. Can somebody help me here?
--
Nathan Sokalski
njsokalski@hotm ail.com
Comment