S
sony.m.2007
Hi,
I have a problem in converting the string to single using
convert.tosingle.
convert.tosingle rounds of .99 to 1.00
my code as below
string st="99.99";
single st1=0.0F;
st1=Convert.ToSingle(st);
When i check the value of st1, it is 100.00.
Is there anyother argument to be passed into convert.tosingle function
to avoid rounding?
Thanks,
Sony
I have a problem in converting the string to single using
convert.tosingle.
convert.tosingle rounds of .99 to 1.00
my code as below
string st="99.99";
single st1=0.0F;
st1=Convert.ToSingle(st);
When i check the value of st1, it is 100.00.
Is there anyother argument to be passed into convert.tosingle function
to avoid rounding?
Thanks,
Sony