SetLength Method

FileStream.SetLength Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Sets the length of this stream to the given value.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Overrides Sub SetLength ( _
	value As Long _
)

Parameters

value
Type: System.Int64
The new length of the stream.

ExceptionCondition
IOException

An I/O error has occurred.

NotSupportedException

The stream does not support both writing and seeking.

ArgumentOutOfRangeException

Attempted to set the value parameter to less than 0.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft