|
-
Feb 18th, 2016, 11:46 AM
#7
Re: padding zeros on strings
Bottom line... you pass to .ToString the format you want ... NUB.Value.ToString("00.0") so 1 will come out "01.0" and 1.9 will come out "01.9"
or, if you need to sift the decimal out...
(NUB.Value * 10).ToString("000")
1 becomes "010" and 1.4 becomes "014"
-tg
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
|