System::IO::File::ReadLines method

File::ReadLines 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())
ParameterTypeDescription
pathconst String&The path of the file to read
encodingconst EncodingPtr&The character encoding to use

ReturnValue

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

See Also