Login   /   Register

Write to a Text File

Rate this article
     1 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 5
Loading ... Loading ...
March 31st, 2008 by daniva

System.IO.File class provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects.
The System.IO.StreamWriter class implements a TextWriter for writing characters to a stream in a particular encoding.
The following code examples show how to write text to a text file.

The first example shows how to add text to an existing file. The second example shows how to create a new text file and write a string to it. Similar functionality can be provided by the WriteAllText methods.

The content you are accessing is for registered users only
Registeration is FREE, quick and private.
You can either Register or Login if you have already registered

Posted in DotNetFactory

2 Responses to “Write to a Text File”

  1. somayer Says:

    [-]

    very well explained..thank you

  2. vinayak Says:

    [-]

    Excellant Posting.

Leave a Reply

You must be logged in to post a comment.

This article was viewed 575 times