Stream.CanSeek 属性

定义

当在派生类中重写时,获取指示当前流是否支持查找功能的值。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

属性值

Boolean

如果流支持查找,为 true;否则为 falsetrue if the stream supports seeking; otherwise, false.

注解

如果从派生的类 Stream 不支持查找,则对 LengthSetLength 、和的调用 Position Seek 可能会引发 NotSupportedExceptionIf a class derived from Stream does not support seeking, calls to Length, SetLength, Position, and Seek may throw a NotSupportedException.

适用于