.net - How to convert to double with 2 precision - string after dot? -


i want convert string: 0.55000000000000004 double: 0.55. how that?

is string or double? if string:

double d = double.parse(s,cultureinfo.invariantculture); string s=string.format("{0:0.00}",d); 

if double format using second line.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -