Is there a way to format a numeric decimal number up to 12 digits?
I need to integrate the project with a payment gateway, and it says that
The amount must be filled with "0" on the left and not contain a decimal point. Example: 1 = 000000000100 or 1.5 = 000000000150
So far I have Convert.ToDecimal (amount) .ToString (). PadLeft (12, '0');
but it gives me 000000000015. I also tried .PadRight, but it does not give a result.
thanks
source
share