System.IO.BufferedStream.CanRead Property

Gets a value indicating whether the current stream supports reading.

Syntax

public override bool CanRead { get; }

Value

Documentation for this section has not yet been entered.

Remarks

If a class derived from System.IO.Stream does not support reading, calls to the BufferedStream.Read(Byte[], int, int), BufferedStream.ReadByte, Stream.BeginRead(Byte[], int, int, AsyncCallback, object), Stream.EndRead(IAsyncResult), and the Peek methods of System.IO.StreamReader, System.IO.StringReader, and System.IO.TextReader throw a NotSupportedException.

If the stream is closed, this property returns false.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0