Szerkesztés

Megosztás a következőn keresztül:


UnmanagedMemoryStream.Seek(Int64, SeekOrigin) Method

Definition

Sets the current position of the current stream to the given value.

public:
 override long Seek(long offset, System::IO::SeekOrigin loc);
public override long Seek (long offset, System.IO.SeekOrigin loc);
override this.Seek : int64 * System.IO.SeekOrigin -> int64
Public Overrides Function Seek (offset As Long, loc As SeekOrigin) As Long

Parameters

offset
Int64

The point relative to origin to begin seeking from.

loc
SeekOrigin

Specifies the beginning, the end, or the current position as a reference point for origin, using a value of type SeekOrigin.

Returns

The new position in the stream.

Exceptions

An attempt was made to seek before the beginning of the stream.

The offset value is larger than the maximum size of the stream.

loc is invalid.

The stream is closed.

Remarks

For more information about seeking, see Seek.

Applies to