File.AppendAllLines Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Appends lines to a file, and then closes the file.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAppendAllLines(String, IEnumerable<String>)

Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file, writes the specified lines to the file, and then closes the file.

System_CAPS_pubmethodSystem_CAPS_staticAppendAllLines(String, IEnumerable<String>, Encoding)

Appends lines to a file by using a specified encoding, and then closes the file. If the specified file does not exist, this method creates a file, writes the specified lines to the file, and then closes the file.

Return to top
Show: