Re: Writing listbox items into text file



On Dec 29, 4:14 pm, "Kerem Gümrükcü" <kareem...@xxxxxxxxxxx> wrote:
Hi kimiraikkonen,

use this if you like:
TextWriter.WriteLine Method.

Check the Stream Classes and their derivates
that come with write line method. You also can
use plain streams of bytes and byte arrays with
your own line feeds and breaks. But if you dont
want to implement this use the already available
write line methods,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space:http://kerem-g.spaces.live.com/
Latest Open-Source Projects:http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Please sample some code. There must be some ways to save all listbox
items as a text file using with my.computer.filesystem.writealltext
classes instead of using Stream Writer's "writeline" method.

I tried something with "for each" but it only saves one(last) item if
append is false.

For Each i As String In ListBox1.Items
My.Computer.FileSystem.WriteAllText("c:\test.txt",
environment.newline & i, False)
Next

If append is true, previous + current items are saved into text file.
But i want current (last updated) items to be saved in a text file.
Shorly, i want to save what and how i see in listbox items as text
file.
.



Relevant Pages

  • Re: Interactive tracing ...
    ... In general, the Stream classes are older, ... ... Java 1.1 until they introduced Readers and Writers, ... that mean that Streams are deficient or no longer relevant. ...
    (comp.lang.java.programmer)
  • portable way to define new stream classes?
    ... In Lispworks I can define my own stream classes, ... I have the source code of the framework and can change it. ... (vector-push-extend byte (slot-value self 'content))) ...
    (comp.lang.lisp)
  • Re: portable way to define new stream classes?
    ... > In Lispworks I can define my own stream classes, ... Most implementations provide a way customize streams, ... can define customized stream classes in portable Common Lisp. ... the stream object, since it won't satisfy the streamp predicate. ...
    (comp.lang.lisp)
  • Re: ostream_iterator with namespaced types - BUG?
    ... > void works ... std::wostringstream&, not Stream, so your operator taking a Stream& does ... Stream classes were not designed for being derived from. ...
    (microsoft.public.vc.stl)
  • Re: Data sent - flushing remainder
    ... i could append the data size to be expected to the first 4 bytes. ... continue to receive that excess data as my socket remains open listening. ... Are you saying i should receive until i get the full amount of data being ... to my cumulative memory stream ...
    (microsoft.public.win32.programmer.networks)