Click or drag to resize
FileInfoOpenRead Method
Creates a read-only FileStream.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public FileStream OpenRead()

Return Value

Type: FileStream
A new read-only FileStream object.
Exceptions
ExceptionCondition
UnauthorizedAccessExceptionpath is read-only or is a directory.
DirectoryNotFoundExceptionThe specified path is invalid, such as being on an unmapped drive.
IOExceptionThe file is already open.
See Also