NetworkStream.CanRead Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the NetworkStream supports reading.
public:
virtual property bool CanRead { bool get(); };
public override bool CanRead { get; }
member this.CanRead : bool
Public Overrides ReadOnly Property CanRead As Boolean
Property Value
true
if data can be read from the stream; otherwise, false
. The default value is true
.
Remarks
If CanRead is true
, NetworkStream allows calls to the Read method. Provide the appropriate FileAccess enumerated value in the constructor to set the readability and writability of the NetworkStream.
Note
The CanRead property is set when the NetworkStream is initialized. Changes in the underlying Socket's state (eg. closure) do not affect the value of CanRead.
Applies to
See also
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for