Share via


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)

Syntax

'Declaration
Public Overrides ReadOnly Property CanWrite As Boolean
public override bool CanWrite { get; }
public:
virtual property bool CanWrite {
    bool get () override;
}
abstract CanWrite : bool with get
override CanWrite : bool with get
override function get CanWrite () : boolean

Property Value

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

Remarks

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.

.NET Framework Security

See Also

Reference

NetworkStream Class

System.Net.Sockets Namespace