dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlBlob Class / Clone Method
Example

Clone Method (PgSqlBlob)
Creates a copy of the current PgSqlBlob object.
Syntax
'Declaration
 
Public Function Clone() As Object
 

Return Value

A new PgSqlBlob object.
Remarks
Creates a new PgSqlBlob object with the properties that have the same values as those of the original object. However, changing properties of the new object has no influence on the values of the same properties of the original object.
Example
In this example a PgSqlBlob instance is created and being written a byte (14 in decimal). Then it is cloned, and the second PgSqlBlob object returns its first byte of data stream (again, 14 in decimal).
public void ClonePgSqlBlob()
{
  PgSqlBlob myBlob = new PgSqlBlob();
  myBlob.WriteByte(14);
  PgSqlBlob myBlob2 = (PgSqlBlob)myBlob.Clone();
  myBlob2.Seek(0,System.IO.SeekOrigin.Begin);
  Console.WriteLine(myBlob2.ReadByte());
}
Public Sub ClonePgSqlBlob()
  Dim myBlob As PgSqlBlob = New PgSqlBlob
  myBlob.WriteByte(14)
  Dim myBlob2 As PgSqlBlob = CType(myBlob.Clone(), PgSqlBlob)
  myBlob2.Seek(0, System.IO.SeekOrigin.Begin)
  Console.WriteLine(myBlob2.ReadByte())
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also