|
-
Jun 2nd, 2006, 09:16 PM
#1
Thread Starter
Junior Member
[RESOLVED] [2005] What happened to string() in vb.net?
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|