Question: For example, if I have a decimal of 10.205 and I subtracted 0.305 of it, then it should be displayed as 09.900 instead of 9.9, as all unnecessary digits before and after should become zeros.

So maybe it would be good having a method that will calculate 10205 - 305 (= 9900) and then return a converted decimal string "09.900".

How can I always stay with the same amount of digits.

Answer: 
If I write this code:

```
decimal x = 10.205m;
decimal y = 0.305m;

decimal z = x - y;

Console.WriteLine(z);

```

The output is `9.900`. No need to do anything special.

Now, if I do `decimal.GetBits(z)` on the above `z` I get `int[] { 9900, 0, 0, 196608 }`.

But, if I redefine `z` as `z = 9.9` and do a `decimal.GetBits(z)` I get `int[] { 99, 0, 0, 65536 }`.

The fourth value in the array is the number of decimal places (if you divide by 65535 you can find out how many).

So, with `z = 9.9` I get 1 decimal place (65536 / 65536 == 1). To change it to 3 decimal places I add `2 * 65536` to the fourth integer, but I also need to multiply the first integer by 100 (or 10 ^ 2). I then get these bits: `int[] { 9900, 0, 0, 196608 }`.

Then you can do `z = new decimal(new int[] { 99 * 10 * 10, 0, 0, 65536 + 2 * 65536 });`.

Then when I do `Console.WriteLine(z)` I get `9.900`.
I built this Extension method:

```
public static decimal getDecimalFixed(decimal amount, decimal subtract)
{
    var parts = amount.ToString().Split('.');
    decimal sum = amount - subtract;

    // get's a string of zeros using the same amount of digits
    string part1zeros = new String('0', parts[0].Length); 
    string part2zeros = new String('0', parts[1].Length);

    // decimal format ex: ToString("000.0000")
    return Convert.ToDecimal(sum.ToString(part1zeros + "." + part2zeros));
} 

```