File.AppendText Method (String)
Creates a StreamWriter that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.
Assembly: mscorlib (in mscorlib.dll)
The caller does not have the required permission.
path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.
path is null.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
The specified path is invalid (for example, the directory doesn’t exist or it is on an unmapped drive).
path is in an invalid format.
This method is equivalent to the StreamWriter(String, Boolean) constructor overload. If the file specified by path does not exist, it is created. If the file does exist, write operations to the StreamWriter append text to the file. Additional threads are permitted to read the file while it is open.
The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.
The path parameter is not case-sensitive.
For a list of common I/O tasks, see Common I/O Tasks.
Available since 10
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0