Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
public void WriteAllLines( string path, IEnumerable<string> contents, Encoding encoding )
Parameters
- path
- Type:
System String
The file to write to.
- contents
- Type:
System.Collections.Generic IEnumerable
String
The lines to write to the file.
- encoding
- Type:
System.Text Encoding
The character encoding to use.
Exceptions
| Exception | Condition |
|---|---|
| path is null. |
See Also