Format double to 3 decimal places without decimal separator to a certain length
To truncate a double to 3 decimal places and remove the decimal separator, is I think more easily done by multiplying by 1000 and casting to an int.  Padding the result to 9 digits is easily done with a format specifier in the ToString method.  It could look something like this:

static string FormatNum(double num) =&gt; ((int)(num * 1000)).ToString("D9");


Note I've also put it in a method with an expression body.

I just noticed that you wanted the padding with spaces not zeros here's a version that does that:

static string FormatNum(double num) =&gt; string.Format("{0,9:D}",((int)(num * 1000)));


As was pointed out, your solution produced a rounded off number.  If that is required here's one way:

static string FormatNum(double num) =&gt; string.Format("{0,9:D}",((int)(Math.Round(num * 1000))));