MemoryStream.CanRead 属性
定义
获取一个值,该值指示当前流是否支持读取。Gets a value indicating whether the current stream 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
属性值
如果流是打开的,则为 true。true if the stream is open.
注解
如果从派生的类不 Stream 支持读取,则对和方法的调用将 Read ReadByte 引发 NotSupportedException 。If a class derived from Stream does not support reading, calls to the Read and ReadByte methods throw a NotSupportedException.
如果流已关闭,则此属性返回 false 。If the stream is closed, this property returns false.