Creating and writing to a text file

  • Thread starter Thread starter amessimon
  • Start date Start date
A

amessimon

Hi i need to create, and write a string to a text file, and then save the
text file in the root directory of my application.

What is the best way to do this? Could anyone provide me with a code example
in VB?

Thanks in advance

Simon Ames
 
StreamWriter file = new StreamWriter("PathToYourRootDirectory")
file.Write("YourText")
file.Flush()
file.Close()
file.Dispose()

Tu-Thac
www.ongtech.co

----- amessimon wrote: ----

Hi i need to create, and write a string to a text file, and then save th
text file in the root directory of my application

What is the best way to do this? Could anyone provide me with a code exampl
in VB

Thanks in advanc

Simon Ame
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top