MemoryStream.CanRead 屬性

定義

取得表示目前資料流是否支援讀取的值。

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

屬性值

Boolean

true,如果資料流已開啟。

備註

如果衍生自 Stream 的類別不支援讀取,則 呼叫 ReadReadByte 方法會擲回 NotSupportedException

如果資料流程已關閉,這個屬性會傳 false 回 。

適用於

另請參閱