I am having trouble figuring out how to obtain data from a listbox and write it to a text file.
Here is my code:
Dim outputFile As StreamWriter
outputFile = File.CreateText(m_strDocumentName)
outputFile.Write(lstMontlyRainfall.Items)
outputFile.Close()
This is writing the following text to my textfile:
System.Windows.Forms.ListBox+ObjectCollection
How can I get the text out of the listbox for all items that were added?
Here is my code:
Dim outputFile As StreamWriter
outputFile = File.CreateText(m_strDocumentName)
outputFile.Write(lstMontlyRainfall.Items)
outputFile.Close()
This is writing the following text to my textfile:
System.Windows.Forms.ListBox+ObjectCollection
How can I get the text out of the listbox for all items that were added?