I am using a payment service that requires all it's charges be submitted as a whole number as such:
$205.01 submitted as 20501
$195.43 submitted as 19543
$42.06 submitted as 4206
I tried this first:
Convert.ToInt32(OrderTotal * 100);
But I found if OrderTotal = $120.01
then I ended up with 12000
, with the hundreds place rounded. What I wanted to end up with is 12001
. How do I perform this conversion without rounding?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…