dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlBlob Class / Clone Method
Example

In This Topic
    Clone Method (MySqlBlob)
    In This Topic
    Creates a copy of the current MySqlBlob object.
    Syntax
    'Declaration
     
    Public Function Clone() As Object
    public object Clone()

    Return Value

    A new MySqlBlob object.
    Remarks
    Creates a new MySqlBlob 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 MySqlBlob instance is created and being written a byte (14 in decimal). Then it is cloned, and the second MySqlBlob object returns its first byte of data stream (again, 14 in decimal).
    public void CloneMySqlBlob()
    {
      MySqlBlob myBlob = new MySqlBlob();
      myBlob.WriteByte(14);
      MySqlBlob myBlob2 = (MySqlBlob)myBlob.Clone();
      myBlob2.Seek(0,System.IO.SeekOrigin.Begin);
      Console.WriteLine(myBlob2.ReadByte());
    }
    Public Sub CloneMySqlBlob()
      Dim myBlob As MySqlBlob = New MySqlBlob
      myBlob.WriteByte(14)
      Dim myBlob2 As MySqlBlob = CType(myBlob.Clone(), MySqlBlob)
      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