Click or drag to resize
FileInfoOpenWrite Method
Creates a write-only FileStream.

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

Return Value

Type: FileStream
A write-only unshared FileStream object for a new or existing file.
Exceptions
ExceptionCondition
UnauthorizedAccessExceptionThe path specified when creating an instance of the FileInfo object is read-only or is a directory.
DirectoryNotFoundExceptionThe path specified when creating an instance of the FileInfo object is invalid, such as being on an unmapped drive.
See Also