OpenText()

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

Opens the specified existing file for reading text using UTF-8 encoding with no sharing.

static StreamReaderPtr System::IO::File::OpenText(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked())

Arguments

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

Return Value

A shared pointer to a StreamWriter object associated with the opened file

See Also