System.Net.Sockets.NetworkStream.CanWrite Property

Gets a value that indicates whether the System.Net.Sockets.NetworkStream supports writing.

Syntax

public override bool CanWrite { get; }

Value

true indicates that the current stream supports writing; false indicates that the current stream does not support writing.

Remarks

If NetworkStream.CanWrite is true, System.Net.Sockets.NetworkStream allows calls to the NetworkStream.Write(Byte[], int, int) method. Provide the appropriate System.IO.FileAccess enumerated value in the constructor to set the readability and writability of the System.Net.Sockets.NetworkStream. The NetworkStream.CanWrite property is set when the System.Net.Sockets.NetworkStream is initialized.

Requirements

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