MemoryStream.CanSeek 属性

定义

获取一个值,该值指示当前流是否支持查找。Gets a value indicating whether the current stream supports seeking.

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

属性值

如果流是打开的,则为 truetrue if the stream is open.

注解

如果从 Stream 派生的类不支持查找,则调用 LengthSetLengthPositionSeek 引发 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.

适用于

另请参阅