Creates a
StreamReader with UTF8 encoding that reads from an existing text file.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public StreamReader OpenText()
Return Value
Type:
StreamReaderA new StreamReader with UTF8 encoding.
Exceptions Exception | Condition |
---|
SecurityException | The caller does not have the required permission. |
FileNotFoundException | The file is not found. |
UnauthorizedAccessException | path is read-only or is a directory. |
DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
See Also