Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Stream::CanSeek Property


When overridden in a derived class, gets a value indicating whether the current stream supports seeking.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

property bool CanSeek {
	virtual bool get() abstract;

Property Value

Type: System::Boolean

true if the stream supports seeking; otherwise, false.

If a class derived from Stream does not support seeking, calls to Length, SetLength, Position, and Seek throw a NotSupportedException.

If the stream is closed, this property returns false.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2016 Microsoft