|
-
Jan 23rd, 2008, 11:44 AM
#1
Thread Starter
Lively Member
[RESOLVED] What is the vb.net syntax for this vb6 function
in vb6 i could do this....
'Add leading zeros
nGroup = String(6 - Len(nGroup), "0") & nGroup
whats the equivalent in vb.net?
Cheers,
Craig
-
Jan 23rd, 2008, 11:47 AM
#2
Re: What is the vb.net syntax for this vb6 function
The PadLeft function.
VB.Net Code:
nGroup = nGroup.PadLeft(6,"0"c)
EDIT: sorry, small mistake in the code. The first argument should be a value determining the length of the resulting string, so it should be 6.
-
Jan 23rd, 2008, 11:52 AM
#3
Thread Starter
Lively Member
Re: What is the vb.net syntax for this vb6 function
nice one, cheers!!
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
|