Uredi

Deli z drugimi prek


NetworkStream.CanWrite Property

Definition

Gets a value that indicates whether the NetworkStream supports writing.

public:
 virtual property bool CanWrite { bool get(); };
public override bool CanWrite { get; }
member this.CanWrite : bool
Public Overrides ReadOnly Property CanWrite As Boolean

Property Value

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.

Note

The CanWrite property is set when the NetworkStream is initialized. Changes in the underlying Socket's state (eg. closure) do not affect the value of CanWrite.

Applies to

See also