________________ method is used for accessing any number of characters in a String.

Nguyễn Pháp

New member
________________ method is used for accessing any number of characters in a String.
A. Substring
B. Contains
C. IndexOf
D. CharAt
 
Answer: A
Explanation: Visual Basic provides the Substring method for accessing any number of characters in a string. The syntax is as follows:
Code:
string.Substring(startIndex[, numCharsToAccess])
In the syntax, string can be a String variable, a String named constant, or the Text property of a control. When processing the Substring method, the computer first makes a temporary copy of the string in memory. It then accesses the specified number of characters in the copy only. The startIndex argument in the syntax is the index of the first character you want to access in the string’s copy.
 

Tìm kiếm

Back
Top