想請問會的大神,當我存檔之後會存成這樣
ListViewItem: {內容}
請問可以不要有ListViewItem: {}這些字嗎嗎?
Dim sfd As New SaveFileDialog
sfd.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
sfd.Filter = "Text files (*.txt)|*.txt"
Dim result As DialogResult = sfd.ShowDialog
If result = Windows.Forms.DialogResult.OK AndAlso sfd.FileName <> String.Empty Then
If ListView1.Items.Count > 0 Then
Using sw As New System.IO.StreamWriter(sfd.FileName)
For index As Integer = 0 To ListView1.Items.Count - 1
sw.WriteLine(ListView1.Items(index).ToString)
Next
sw.Close()
End Using
End If