Click or drag to resize
BinaryWriterSeek Method
Sets the position within the current stream.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual long Seek(
	int offset,
	SeekOrigin origin
)

Parameters

offset
Type: SystemInt32
A byte offset relative to origin.
origin
Type: System.IOSeekOrigin
A field of SeekOrigin indicating the reference point from which the new position is to be obtained.

Return Value

Type: Int64
The position with the current stream.
Exceptions
ExceptionCondition
IOExceptionThe file pointer was moved to an invalid location.
ArgumentExceptionThe SeekOrigin value is invalid.
See Also