File: WriteAllText

WriteAllText

Opens a files, writes out all contents to the file, then closes the file.



 Public Sub WriteAllText(
	  ByRef Path As String,
	  ByRef Contents As String,
	  Optional ByVal Encoding As Encoding )

Parameters

Path
[ByRef] String. The path and filename of the file to write to.
Contents
[ByRef] String. The contents to write to the file.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when writing to the file.

Remarks

If the file does not exist, it will be created. If the file already exists, it will be overwritten.

See Also

Project CorLib Overview

Class File Overview