____________________ and ____________________ methods are used to align characters in a String.

Lượng Tiger

New member
____________________ and ____________________ methods are used to align characters in a String.
A. PadLeft, PadRight
B. Left, Right
C. LeftAlign, RightAlign
D. AlignLeft, AlignRight
 
Answer: A
Explanation: You can use Visual Basic’s PadLeft and PadRight methods to align the characters in a string. The methods do this by inserting (padding) the string with zero or more characters until the string is a specifi ed length; each method then returns the padded string. The syntax is as follows:
Code:
string.PadLeft(totalChars[, padCharacter])
string.PadRight(totalChars[, padCharacter])
 

Tìm kiếm

Back
Top