When overridden in a derived class, sets the length of the current stream.
Namespace:
Contracts
Assembly: Contracts (in Contracts.dll)
Assembly: Contracts (in Contracts.dll)
Exception type | Condition |
---|---|
An I/O error occurs. |
|
Methods were called after the stream was closed. |
|
The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. |