May 2010
Intermediate to advanced
1272 pages
61h 18m
English
You create text files instantiating the StreamWriter class, which is a specific stream implementation for writing to text files. The following code, that will be explained, provides an example:

The constructor provides several overloads; the one used in the code receives the file name to be created—a Boolean value indicated whether the text must be appended if the file already exists and how the text is encoded. WriteLine is a method that writes a string and then puts a line terminator character. When you are done you must close the stream invoking Close. You can also invoke Write to put in just one character. The ...
Read now
Unlock full access