You can also do composite formatting with String.Format where the alignment part indicates the preferred formatted field width and will automatically pad shorter strings. Enough room have to be specified because this value won't crop longer strings to fit the field.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.