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从派生的类不支持查找, 则调用、 Length SetLength Position、和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.

适用于

另请参阅