Here I am trying to take an input number value by a user and add X number of preceeding 0's to it to make it have a total of 9 digits.

They input "37" then I want: 000000037
They input "4050" then I want: 000004050

(They will never enter more than 4 digits, sort of besides the point)

I recall using the old string() function in vb6 where I would whip up something like:

new_string$ = string(9 - len(uservalue), "0") & uservalue

(man, those were the days!)

How can I do the equivalent in vb.net without ugly if statements or recursive code? It seems the string() function is gone, right?

Thank you guys as always!

-Josh