1

私はvbを学んでいて、テキストボックスに特定のチェックされた項目を出力する際に​​いくつかの問題があります。私は多くの方法を試しましたが、まだ正しい方法を取得できません。何かを忘れているのでしょうか?

    Private Sub submitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submitBtn.Click
    Dim output As String
    Dim listOfProd As String
    listOfProd = ""


    output = "Selected Region: " + destination.Text + Environment.NewLine + "Seleted Place: " +
        places.SelectedItem + Environment.NewLine + "Accomodation: " +
        accomodation.Text + Environment.NewLine + "Products Selected: " + Environment.NewLine

    For i As Integer = 0 To products.Items.Count
        If products.Items(i) Is products.CheckedItems Then
            listOfProd = listOfProd + products.Items(i)

        End If
    Next

    output = output + listOfProd

    outputHere.Text = output
4

1 に答える 1