CanWrite Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets a value that indicates whether the NetworkStream supports writing.

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)

public override bool CanWrite { get; }

Property Value

Type: System..::..Boolean
true if data can be written to the NetworkStream; otherwise, false. The default value is true.

If CanWrite is true, NetworkStream allows calls to the Write method. Provide the appropriate FileAccess enumerated value in the constructor to set the readability and writability of the NetworkStream. The CanWrite property is set when the NetworkStream is initialized.

Show: