title: Saving Columns of listview in VB with separator
body: <p>So I have a listview which has two columns. the listview view is details.</p>
  
  <p>I have successfully imported a file into the list view with correct splits. The code i used is,</p>
  
  <p><code>Using sr As StreamReader = File.OpenText( file path )
                  While (-1 &lt; sr.Peek())
                      Dim line As String = sr.ReadLine()
                      Dim item As New ListViewItem(line.Split(":"c))
                      ListView1.Items.Add(item)
                  End While
                  sr.Close()
              End Using</code></p>
  
  <p>So this imports the lines from my file to the program into correct columns with : as split.
  Now I also have a option for users to add data from my program to the file the same way, I used this code,</p>
  
  <pre><code>     Using sw As StreamWriter = File.AppendText(file path)
      For Each item As ListViewItem in ListView1
        Dim line As String = Nothing
        For Each entry As String in item.SubItems
          line.Append(entry &amp; ":")
        Next For
        sw.WriteLine(line)
      Next For
      sw.Close()
    End Using
  </code></pre>
  
  <p>Taken from : <a href="https://stackoverflow.com/questions/10162262/separating-text-from-txt-into-colums-in-listview-vb-net-mobile">Separating text from .txt into colums in listview (VB.net mobile)</a>
  But my bad, vb gives this error,</p>
  
  <blockquote>
    <p>Error 1   Expression is of type 'System.Windows.Forms.ListView', which is not a collection type.  C:\Users\xxxx\documents\visual studio 2012\xxxxx\Form1.vb   97</p>
  </blockquote>
  
  <p>I am not sure why i am getting this error, is it because of my list views properties ?</p>
  
  <p>I want to be able to save the data to the text file when user click a button.</p>