System::IO::File::ReadAllText method

File::ReadAllText method

Reads the content of the specified text file to a single String object using the specified character encoding.

static String System::IO::File::ReadAllText(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8())
ParameterTypeDescription
pathconst String&The path of the file to read
encodingconst EncodingPtr&The character encoding to use

ReturnValue

A string containing the content of the specified file

See Also