7 Replies - 658 Views - Last Post: 24 November 2011 - 01:43 AM Rate Topic: -----

#1 shwetha123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 20-July 11

reading and writing a text file

Posted 23 November 2011 - 10:03 PM

Could anyone please help me how to read and write a text file in vb.net
Is This A Good Question/Topic? 0
  • +

Replies To: reading and writing a text file

#2 billyboy630  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 94
  • Joined: 09-October 09

Re: reading and writing a text file

Posted 23 November 2011 - 10:12 PM

My link
Was This Post Helpful? 0
  • +
  • -

#3 Jeff H  Icon User is offline

  • D.I.C Regular

Reputation: 112
  • View blog
  • Posts: 308
  • Joined: 30-January 11

Re: reading and writing a text file

Posted 23 November 2011 - 10:17 PM

1. Open Ie
2. Go to google.com
3. Enter 'vb.net read and write text file'
4. Click Search button

Then links like this are returned

How to: Read Text from a File

How to: Write Text to a File
Was This Post Helpful? 0
  • +
  • -

#4 billyboy630  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 94
  • Joined: 09-October 09

Re: reading and writing a text file

Posted 23 November 2011 - 10:29 PM

View PostJeff H, on 23 November 2011 - 10:17 PM, said:

1. Open Ie
2. Go to google.com
3. Enter 'vb.net read and write text file'
4. Click Search button

Then links like this are returned

How to: Read Text from a File

How to: Write Text to a File

Can you show me some sample code on how to open IE ? I am a new LOL
Was This Post Helpful? 0
  • +
  • -

#5 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: reading and writing a text file

Posted 23 November 2011 - 11:33 PM

There are many ways - look in the IO namespace. Some good ideas are:
Io.File.ReadAllText
Io.File.WriteAllText
The StreamReader object
The StreamWriter object.

For details, look up:
Example msdn
replace example with the things I mentioned above.
Was This Post Helpful? 0
  • +
  • -

#6 shwetha123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 20-July 11

Re: reading and writing a text file

Posted 24 November 2011 - 12:11 AM

I'm able to read and write a file now...But how to do the one below
1)Function to read the file into an in-memory structure of lists.
2)Function to write the file fromm memory to any folder.
Was This Post Helpful? 0
  • +
  • -

#7 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: reading and writing a text file

Posted 24 November 2011 - 12:43 AM

Once again, the StreamReader and StreamWriter, which are incredibly versatile.
Was This Post Helpful? 0
  • +
  • -

#8 shwetha123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 20-July 11

Re: reading and writing a text file

Posted 24 November 2011 - 01:43 AM

ok..Can u explain it to me with an example(with few lines of code)??
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1