In The Hand LtdIn The Hand
WriteAllLines Method (path, contents, encoding)
NamespacesInTheHand.IOFileHelperWriteAllLines(String, array<String>[]()[][], Encoding)
.NET Components for Mobility
Creates a new file, writes the specified string array to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
Declaration Syntax
C#Visual Basic
public static void WriteAllLines(
	string path,
	string[] contents,
	Encoding encoding
)
Public Shared Sub WriteAllLines ( _
	path As String, _
	contents As String(), _
	encoding As Encoding _
)
Parameters
path (String)
The file to write to.
contents (array<String>[]()[][])
The string array to write to the file.
encoding (Encoding)
An Encoding object that represents the character encoding applied to the string array.
Exceptions
ExceptionCondition
ArgumentNullExceptionpath is a null reference (Nothing in Visual Basic) or contents string is empty.

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0