Writing to Files in Visual Basic

This section explains how to perform tasks that involve writing to files.

In This Section

How to: Write Text to Files
Demonstrates how to write to text files.

How to: Append to Text Files
Demonstrates how to append text to a text file.

How to: Write to Binary Files
Demonstrates how to write to a binary file.

How to: Write Text to Files in the My Documents Directory
Demonstrates how to create and write to a new text file in the My Documents directory.

How to: Write Text to Files with a StreamWriter
Demonstrates how to write to a file with a System.IO.StreamWriter object.

Reference

FileSystem
Describes the My.Computer.FileSystem object and its methods and properties.

OpenTextFileWriter
Describes the OpenTextFileWriter method.

WriteAllBytes
Describes the WriteAllBytes method.

WriteAllText
Describes the WriteAllText method.

Reading from Files
Explains how to perform tasks that involve reading from files.

Creating, Deleting, and Moving Files and Directories
Explains how to perform tasks that involve creating, deleting, moving, and renaming files and directories.

Storing Data to and Reading from the Clipboard
Explains how to perform tasks that are associated with My.Computer.Clipboard, such as reading data from or writing data to the Clipboard.

File Encodings
Provides an overview of file encodings.