Results 1 to 3 of 3

Thread: Save Items Collection in text file

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Posts
    5

    Save Items Collection in text file

    I try to storage from listbox the Items Collection in a file... but i don't have any idea how to do this. Can somebody help me.
    Yo mamma Osama...

  2. #2
    New Member
    Join Date
    Dec 2003
    Posts
    12
    Dim SW as StreamWriter
    Dim FS as FileStream

    FS=New FileStream("C:\Items.txt", FileMode.Create)
    SW=New StreamWriter(FS)
    Dim itm as Object
    For Each itm In Listbox1.Items
    SW.WriteLine(itm.ToString)
    Next

    SW.Close
    FS.Close

    --------------

    Hope to help
    Things go better with rock

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width