I am trying to format a numeric value with leading spaces, to pack the string out to a given length, thus:-
mystring = mynumber.ToString ("format-string")
but am having no luck finding the correct format string. I have seen the question here and tried the answer suggested, but it doesn't work. For 123.4,
.ToString ("####.#") gets "123.4"
.ToString ("6:####.#") gets "6:123.4"
.ToString ("0,6:####.#") gets "06:0,123.4"
.ToString ("{####.#}") gets "{123.4}"
.ToString ("{6:####.#}") gets "{6:123.4}"
.ToString ("{0,6:####.#}") gets "{06:0,123.4}"
Is there anything I can try to get " 123.4"
?