using System.Globalization;
public static void Main()
decimal d2 = EnsureDecimalPlaces(d1, 8);
Console.WriteLine(Convert.ToDouble(d2));
static decimal EnsureDecimalPlaces(decimal input, int decimalPlaces)
int currentPlaces = BitConverter.GetBytes(decimal.GetBits(input)[3])[2];
int missingZeros = decimalPlaces - currentPlaces;
: input * GetMultiplier();
return decimal.Parse($"1{NumberFormatInfo.CurrentInfo.NumberDecimalSeparator}{new string('0', missingZeros)}");