File.AppendAllLines Method (String, IEnumerable<String>)
When it is called by trusted applications, appends lines to a file, and then closes the file.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Sub AppendAllLines ( _ path As String, _ contents As IEnumerable(Of String) _ )
public static void AppendAllLines( string path, IEnumerable<string> contents )
path is a zero-length string, contains only white space, or contains one more invalid characters defined by the GetInvalidPathChars method.
Either path or contents is nulla null reference (Nothing in Visual Basic).
path is invalid (for example, it is on an unmapped drive).
The file specified by path was not found.
An I/O error occurred while opening the file.
path exceeds 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.
path is in an invalid format.
The caller does not have permission to write to the file.
path specifies a file that is read-only.
This operation is not supported on the current platform.
path is a directory.
The caller does not have the required permission.
For more information about trusted applications, see Trusted Applications.
Supported in: 5, 4
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.