Write a For Each loop that displays every element of an array named strSongNames in a ListBox named lstDisplay. The loop variable is named strPlay
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strSongNames() As String = {"AC/DC Current", "Act Naturally", "Afro Puffs"}
For Each strPlay In strSongNames
lstDisplay.Items.Add(strPlay)
Next
End Sub
End Class
Comments
Leave a comment