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
 
Back
Top