What names are displayed in the list box when the button is clicked on?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim file As String = "Ships.txt"
Dim ships As String = FillArray(file)
lstBox.Items.Add(ships(2) )
lstBox.Items.Add(ships.Min)
End Sub
Function FillArray(file As String) As String
Dim names As String = IO.File.ReadAllLines(file)
Return names
End Function
Assume the three lines of the file Ships.txt contain the following entries: Pinta, Nina, Santa Maria.
A) Pinta and Nina
B) Santa Maria and Pinta
C) Nina and Santa Maria
D) Santa Maria and Nina
Correct Answer:
Verified
Q21: What is the output of the following
Q22: The following pair of statement is valid.
x
Q23: Given the Dim statement below, which set
Q24: What is the output of the following
Q25: If the following statement appears in a
Q27: What numbers are displayed in the list
Q28: Consider the following Dim and assignment statements
Q29: What numbers are displayed in the list
Q30: Unless otherwise specified, Visual Basic assigns the
Q31: What is the output of the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents