System.Net.Sockets.NetworkStream.SetLength Method

Sets the length of the stream. This method always throws a NotSupportedException.

Syntax

public override void SetLength (long value)

Parameters

value
This parameter is not used.

Exceptions

TypeReason
NotSupportedExceptionAny call to this method.

Remarks

Note:

The System.IO.Stream base class uses this method to set the length of the data available on the stream. This functionality is not supported in the System.Net.Sockets.NetworkStream class.

This method overrides System.IO.Stream.SetLength(long).

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0