Link to home
Start Free TrialLog in
Avatar of sunshine737
sunshine737

asked on

writing to a file using VB.NET

Hi,

i am trying to create a file and store data(this data is stored in the string) in  that file

dim content  as string = "some content of huge amount of data"

i want to
create a file  and write the content to the file.

as there are lot of ways to create a file and write the content to that file,

which is the right way to create file and write content to the file.


thanks for your help,

regards


SOLUTION
Avatar of tovvenki
tovvenki

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunshine737
sunshine737

ASKER

Hi,

If the file already exists ,then replace the file.


regards



ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes it will overwritwe the contents. If you don't want to overwrite then you can append or see if the file exists and display a message box.
You can look at the link in my previous post for more samples on how to do that.

Hope that this helps you
regards,
Venki