I'm converting a string to a decimal with decimal.Parse()
:
decimal.Parse(transactionAmount)
If transactionAmount
contains a whole number such as 1
, the result is a decimal value of 1
. The system I'm sending it to outside of my program treats it as 1 cent for some unknown reason unless it shows up as 1.00
. How can I make sure that whole numbers contain a decimal point and a zero such as 1.0
?