Re: Writing listbox items into text file
- From: "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx>
- Date: Sat, 29 Dec 2007 15:25:07 +0100
"kimiraikkonen" <kimiraikkonen85@xxxxxxxxx> schrieb:
I can read from a text file and insert text file's contents into a
listbox whose format is line by line using this code:
Dim reader As String
reader = My.Computer.FileSystem.ReadAllText("c:
\bookmarks.txt")
Dim strs() As String
strs = Split(reader, Environment.NewLine)
For Each s As String In strs
ListBox1.Items.Add(s)
Next
=> 'ListBox1.Items.AddRange(strs)'.
But i also want to write all listbox items into text file "line by
line"? How can i do this?
I tried My.Computer.FileSystem.WriteAlltext but couldn't make out
completely.
Take a look at the 'Join' function.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
.
- Follow-Ups:
- Re: Writing listbox items into text file
- From: kimiraikkonen
- Re: Writing listbox items into text file
- References:
- Writing listbox items into text file
- From: kimiraikkonen
- Writing listbox items into text file
- Prev by Date: Re: Writing listbox items into text file
- Next by Date: Character conversion ASCII to UTF-8?= Old Accesstable to Unicode
- Previous by thread: Re: Writing listbox items into text file
- Next by thread: Re: Writing listbox items into text file
- Index(es):
Relevant Pages
|
Loading