Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Streamwriter doesn't write?

$
0
0
I been working on this thing all day today, and I finally gave up and decided to ask for help from you guys. Basically, whenever I hit Add, it just doesn't write in a text file.

fListView.Items.Add(fname.Text).SubItems.Add(femail.Text)

        Try

            w = New IO.StreamWriter(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "/flist.txt", True)

            Dim ii As Integer
            Dim line As String = r.ReadLine
            For ii = 0 To fListView.Items.Count - 1
                w.WriteLine(fListView.Items.Item(ii).Text & ":" & fListView.Items.Item(ii).SubItems.Item(ii).Text)
            Next
            w.Close()

        Catch
        End Try



I am using Listview that has 2 columns.

What am I doing wrong?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>