IOHelperReadAllText(String, Encoding) Method

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

Definition

Namespace: Configuration.Helper
Assembly: Configuration.Helper (in Configuration.Helper.dll) Version: 2.0.5
C#
public static string ReadAllText(
	string path,
	Encoding encoding
)

Parameters

path  String
The file to open for reading.
encoding  Encoding
The encoding applied to the contents of the file.

Return Value

String
A string containing all lines in the file.

See Also