Hello.I'm working on a Visual Basic project where I have to use an array of strings that generate random sentences in a list box using the same strings. For example, if I was using the words "the", "cat", and "died" in the strings and it came out to "the cat died" the first time, the program would have to rewrite a different sentence each time using the same words when I click on a button. I have the basic things down, I'm just having trouble figuring out how to generating random sentences each time. Can I please get some help?If anyone wants the full code, I will gladly provide it.
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click Dim str(5) As String str(0) = "cat " str(1) = "ate" str(2) = "in " str(3) = "dog" str(4) = "hat" str(5) = "the " lstOutput.Items.Add(str(5) & str(0) & str(2) & str(5) & str(4))End Sub