IsolatedStorageFileStream.Seek Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the current position of this IsolatedStorageFileStream object to the specified value.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Overrides Function Seek ( _
    offset As Long, _
    origin As SeekOrigin _
) As Long
[SecuritySafeCriticalAttribute]
public override long Seek(
    long offset,
    SeekOrigin origin
)

Parameters

Return Value

Type: System.Int64
The new position in the IsolatedStorageFileStream object.

Exceptions

Exception Condition
IsolatedStorageException

The isolated store has been removed.

-or-

Isolated storage is disabled.

ArgumentException

origin must be one of the SeekOrigin values.

NotSupportedException

The stream does not support seeking.

IOException

The stream is closed or an internal error has occurred.

ObjectDisposedException

The stream has been disposed.

Remarks

Some IsolatedStorageFileStream objects support positioning beyond the length of the stream, others will throw an exception in this case.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.