File: ReadAllLines

ReadAllLines

Opens a file, reads all lines in a file into an array and closes the files.

 Public Function ReadAllLines(
	  ByVal Path As String,
	  Optional ByVal Encoding As Encoding ) As String ( )

Parameters

Path
[ByVal] String. The path and filename of the file to read in.
Encoding
[ByVal] Optional. Encoding. The encoding to use to decode the file into text characters.

Return Values

String() -  A String array containing all of the lines in the file.

Remarks

The end of a line is indicated when either a Return (13), LineFeed (10), or a Return-LineFeed combination have been encountered.

See Also

Project VBCorLib Overview | Class File Overview