Skip to main content

MemoryStream.SetSize

SetSize

Syntax

SetSize(<Size>)

Parameters

<Size> (required)

Type: Number. Established size of the stream.

Description

Sets the stream size. If the current size exceeds the specified size, the stream will be reduced to the specified size and the information exceeding the specified size will be lost. If the current size of the stream is less than the specified size, the stream content between the previous and the new size is not defined.

Availability

Thin client, web-client, mobile client, server, thick client, external connection, mobile application (client), mobile application (server), mobile standalone server, Integration.

Note

You can set the stream length only if the recording and change of the positions are permitted in the stream. Otherwise, an exception will be generated.

See also

Stream, method BeginSetSize Stream, method Size Stream, method SetSizeAsync

Translation

Русская версия: ПотокВПамяти.УстановитьРазмер (MemoryStream.SetSize)