dotConnect Universal Documentation
Devart.Data.Universal Namespace / UniBlob Class / Seek Method
A byte offset relative to origin.
A value of System.IO.SeekOrigin type indicating the reference point used to obtain the new position.
Example

    Seek Method
    Sets the position on the current UniBlob stream.
    Syntax
    'Declaration
     
    Public Function Seek( _
       ByVal offset As Long, _
       ByVal origin As SeekOrigin _
    ) As Long
     

    Parameters

    offset
    A byte offset relative to origin.
    origin
    A value of System.IO.SeekOrigin type indicating the reference point used to obtain the new position.

    Return Value

    The new position within the current stream.
    Remarks
    If offset is negative, the new position is required to precede the position specified by origin by the number of bytes specified by offset. If offset is zero (0), the new position is required to be the position specified by origin. If offset is positive, the new position is required to follow the position specified by origin by the number of bytes specified by offset.
    Example
    The first line of the example sets stream position to the very first element.
    myBlob.Seek(0, SeekOrigin.Begin);
    Console.WriteLine(myBlob.Position);
    Console.WriteLine(myBlob.ReadByte());
    myBlob.Seek(0, SeekOrigin.Begin)
    Console.WriteLine(myBlob.Position)
    Console.WriteLine(myBlob.ReadByte())
    See Also