Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

C# rounding up or down in

$
0
0

How would I change this to round up or down ?

I have tried everything but the correct one.

Double, convert to double Trypharse, Math.Round Ceiling, Floor.

not sure where to add it.

Thanks

 //= AN2 * AO2
                decimal AN2 = Convert.ToDecimal(rows.Cells[39].Value ?? 0);
                decimal AO2 = Convert.ToDecimal(rows.Cells[40].Value ?? 0);
                var AP = AN2 * AO2;
                rows.Cells[41].Value = AP;


Booney440



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>