Stream.CanSeek Stream.CanSeek Stream.CanSeek Stream.CanSeek Property

定義

在衍生類別中覆寫時,取得指示目前資料流是否支援搜尋的數值。When overridden in a derived class, gets a value indicating whether the current stream supports seeking.

public:
 abstract property bool CanSeek { bool get(); };
public abstract bool CanSeek { get; }
member this.CanSeek : bool
Public MustOverride ReadOnly Property CanSeek As Boolean

屬性值

如果資料流支援搜尋,則為 true,否則,為 falsetrue if the stream supports seeking; otherwise, false.

備註

如果類別衍生自Stream不支援搜尋,呼叫LengthSetLengthPosition,並Seek擲回NotSupportedExceptionIf a class derived from Stream does not support seeking, calls to Length, SetLength, Position, and Seek throw a NotSupportedException.

如果資料流已關閉,則這個屬性會傳回falseIf the stream is closed, this property returns false.

適用於

另請參閱