ReadLines()

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

Reads the content of the specified text file line by line using the specified character encoding and returns enumerable collection of strings each of which represents a single line of the file’s content.

static SharedPtr<Collections::Generic::IEnumerable<String>> System::IO::File::ReadLines(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

An enumerable collection of strings representing the content of the specified file

See Also