jamesG77296 jamesG77296 - 1 year ago 102
Vb.net Question

populating label with an array of Strings

I have a list of string and I would like to populate my label with them

This is what i have so far but doesn't seem to work

Dim _items() As String = {"Apple", "Orange", "Banana", "Mango"}

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

label1 = _item

End Sub

This is how I want my output to be

enter image description here

Answer Source
label1.Text = String.Join(vbCrLf, items)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download