Hey guys,
I created a new My.Settings entry named "AllCities". It is a list (string collection) of a couple hundred cities, each one on a separate line. On form load, I want to grab the value of "AllCities" and populate a ListView with those cities. Here's what I have so far...
But when I run the above code, the only text I get in the ListView is "Systems.Collections.Specialized..."
What am I missing here?
I created a new My.Settings entry named "AllCities". It is a list (string collection) of a couple hundred cities, each one on a separate line. On form load, I want to grab the value of "AllCities" and populate a ListView with those cities. Here's what I have so far...
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim AllCitiesString = My.Settings.AllCities.ToString
Dim AllCitiesList As New List(Of String)(AllCitiesString.Split(Environment.NewLine))
For Each City As String In AllCitiesList
ListView1.Items.Add(City)
Next
End SubWhat am I missing here?