c# - Take 4 places after decimal for a double variable -


this question has answer here:

i dont want round want take 4 places after decimal.

example:

double = 0.00038;  

i want result

0.0003   // 8 discarded  

how can achieve that?

double result = math.truncate(10000 * something) / 10000; 

Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -