SeekOrigin Enumeration

SeekOrigin Enumeration


Specifies the position in a stream to use for seeking.

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

type SeekOrigin

Member nameDescription

Specifies the beginning of a stream.


Specifies the current position within a stream.


Specifies the end of a stream.

SeekOrigin is used by the Seek methods of Stream, BufferedStream, FileStream, MemoryStream, BinaryWriter, and other classes. The Seek methods take an offset parameter that is relative to the position specified by SeekOrigin.

The following example shows how to read backwards starting at the end of the stream, and how to read from a specified point in the stream.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 4.5
.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
© 2015 Microsoft