![]() ![]() | ||
As discussed in the In Depth section of this chapter, you can use the FileStream class to open or create files, and then use other classes, like BinaryWriter and BinaryReader, to work with the data in the file. Here's the hierarchy of the FileStream class:
Object MarshalByRefObject Stream FileStream
You can find the more notable public properties of FileStream objects in Table 13.7 and the more notable public methods in Table 13.8.
Property |
Means |
---|---|
CanRead |
Determines if the stream supports reading. |
CanSeek |
Determines if the stream supports seeking. |
CanWrite |
Determines if the stream supports writing. |
Handle |
Gets the operating system file handle for the stream's file. |
IsAsync |
Determines if the stream was opened asynchronously or synchronously. |
Length |
Gets the length of the stream in bytes. |
Name |
Gets the name of the file stream passed to the constructor. |
Position |
Gets/sets the position in this stream. |
![]() ![]() | ||