Sign in to follow this  
xarzu

rounding a float number

Recommended Posts

xarzu    0

I have a float data type in C#.

Let's say its value is

5.827671

and I want to concat/round it to the nearest 100th place

5.83

How would I do that?

The value is ported to a string by

floatvalue.ToString()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.