Hello, hello, I have an application in C# and I need to capture in AS400 an amount that has 3 decimal places, I have the following code:
double galones = Gallons / Balance;
galones = Math.Round(galones, 3);
I need someone to help me to do data processing, so that when I get 0.12 another 0 is added and thus have 3 decimals, because when the third or second decimal is 0 they are deleted and I want to keep the decimal with 3
Once you have the numerical result to which you want to add the zeros to the right of the decimal point, you must convert it to a string, using 'ToString("fX")', in which the "X" can be replaced by the number of digits you want after the decimal point. Example: