[php] Private Sub SaveListViewContent(ByVal ltv As ListView, ByVal filename As String, ByVal colDelimeter As Char)
Dim sb As New System.Text.StringBuilder
For Each itm As ListViewItem In ltv.Items
Dim colsOfLine As New List(Of String)
For Each colItm As ListViewItem.ListViewSubItem In itm.SubItems
colsOfLine.Add(colItm.Text)
Next
sb.AppendLine(String.Join(colDelimeter, colsOfLine.ToArray))
Next
IO.File.WriteAllText(filename, sb.ToString)
End Sub
Private Sub LoadToListView(ByVal filename As String, ByVal ltv As ListView, ByVal colDelimeter As Char)
If Not IO.File.Exists(filename) Then Throw New IO.FileNotFoundException
For Each line As String In IO.File.ReadAllLines(filename)
Dim colsOfLine() As String = line.Split(colDelimeter)
While colsOfLine.Length > ltv.Columns.Count
ltv.Columns.Add("Column " & ltv.Columns.Count)
End While
ltv.Items.Add(New ListViewItem(colsOfLine))
Next
End Sub[/php]