ReadAllLines()

File::ReadAllLines(const String&, const EncodingPtr&) method

Reads the content of the specified text file line by line to an array of strings using the specified character encoding.

static ArrayPtr<String> System::IO::File::ReadAllLines(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8())

Arguments

ParameterTypeDescription
pathconst String&The path of the file to read
encodingconst EncodingPtr&The character encoding to use

Return Value

A string array each element of which represents a single line from the specified file

See Also