How can I fill an array with string values from an InputBox and then display that in a ListBox?
This does not work right and just displays "String[] Array"
Code:
Public Class frmQuiz
Dim strQuestions(10) As String
Private Sub btnQuestion2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuestion2.Click
Dim strQuestion2 As String
strQuestion2 = InputBox("What is the last name of the player who many consider to be the best player of all time?")
strQuestions(1) = strQuestion2
End Sub
Private Sub btnGradeQuiz_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGradeQuiz.Click
MessageBox.Show("Your answers will be displayed. You may make changes to your response before you submit.")
For Each Value As String In strQuestions
lstAnswers.Items.Add(strQuestions)
Next
End Sub
This does not work right and just displays "String[] Array"
Comment