Formatting numbers with significant figures in C#

Posted by Chris Farmer on Stack Overflow See other posts from Stack Overflow or by Chris Farmer
Published on 2008-10-01T15:21:32Z Indexed on 2010/04/15 22:13 UTC
Read the original article Hit count: 244

Filed under:
|

I have some decimal data that I am pushing into a SharePoint list where it is to be viewed. I'd like to restrict the number of significant figures displayed in the result data based on my knowledge of the specific calculation. Sometimes it'll be 3, so 12345 will become 12300 and 0.012345 will become 0.0123. Occasionally it will be 4 or 5. Is there any convenient way to handle this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about significant-figures