In The Hand LtdIn The Hand
ReadAllText Method (path, encoding)
NamespacesInTheHand.IOFileHelperReadAllText(String, Encoding)
.NET Components for Mobility
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
Declaration Syntax
C#Visual Basic
public static string ReadAllText(
	string path,
	Encoding encoding
)
Public Shared Function ReadAllText ( _
	path As String, _
	encoding As Encoding _
) As String
Parameters
path (String)
The file to open for reading.
encoding (Encoding)
The encoding applied to the contents of the file.
Return Value
A string containing all of the file.
Exceptions
ExceptionCondition
ArgumentNullExceptionpath is a null reference (Nothing in Visual Basic).

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0