Q. What will contain in txtFirst after the following Visual Basic code is executed?
Code:
strName = "Penny Swanson" txtFirst.Text = strName.Remove(5)
β
Correct Answer: (A)
Penny
Explanation: The Remove method in Visual Basic removes a specified number of characters from a string starting from the beginning. In this code snippet, strName is assigned the value "Penny Swanson". Then, the Remove method is used to remove characters from the beginning of strName.