Skip to main content
.NET Framework Class Library
String..::.PadLeft Method





Returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified Unicode character.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
 NameDescription
Public methodPadLeft(Int32)Returns a new string that right-aligns the characters in this instance by padding them with spaces on the left, for a specified total length.
Public methodPadLeft(Int32, Char)Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.
Top
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?