File.WriteAllLines Method

When it is called by a trusted application, creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Static member WriteAllLines(String, IEnumerable<String>) When it is called by trusted applications, creates a new file, writes a collection of strings to the file, and then closes the file.
Public method Static member WriteAllLines(String, IEnumerable<String>, Encoding) When it is called by trusted applications, creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
Top

Community Additions

ADD
Show: