Solved

What Names Are Displayed in the List Box When the Button

Question 26

Multiple Choice

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents