N
Nathan Sokalski
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.332999999999998
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?
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.332999999999998
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?