[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Sets the length of this stream to the given value.
Assembly: System.IO (in System.IO.dll)
If the given value is less than the current length of the stream, the stream is truncated. If the given value is larger than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and the new length are undefined.
A stream must support both writing and seeking for SetLength to work.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.