L
leej
Im hoping someone can help me to work out where/what Im missing here.
Ive a line in a moderately sized program
decimal d1 = Decimal.Parse("0.1");
When I check the result in Visual Studio or perform any math using d1,
the value of d1 is 1.
Thinking I was missing something obvious (it is late here), I changed
d1 the line to
Decimal decVariable = Decimal.Parse("0.8");
And the result was 8.
Things became even more bizarre when I changed the Decimal to a Double
with the same result and then wrote a seperate little test app and got
the results I expected.
Is there anything obvious I am missing here? Its been a while since I
worked with c#/.net (this is VS 2005/.Net 2.0) and am sure its
something Im doing wrong...
Tia
Ive a line in a moderately sized program
decimal d1 = Decimal.Parse("0.1");
When I check the result in Visual Studio or perform any math using d1,
the value of d1 is 1.
Thinking I was missing something obvious (it is late here), I changed
d1 the line to
Decimal decVariable = Decimal.Parse("0.8");
And the result was 8.
Things became even more bizarre when I changed the Decimal to a Double
with the same result and then wrote a seperate little test app and got
the results I expected.
Is there anything obvious I am missing here? Its been a while since I
worked with c#/.net (this is VS 2005/.Net 2.0) and am sure its
something Im doing wrong...
Tia