dotConnect for Google BigQuery Documentation
Devart.Data Namespace / SqlShimCommand Class / Clone Method
Example

On this page
    Clone Method (SqlShimCommand)
    On this page
    Creates a new object that is a copy of the current SqlShimCommand instance.
    Syntax
    'Declaration
     
    Public Function Clone() As SqlShimCommand
    public SqlShimCommand Clone()

    Return Value

    A new SqlShimCommand object in which all property values are the same as the original.
    Remarks
    Use this method when you need to create a new SqlShimCommand object that is absolutely like existing one.
    Example
    This example shows how to clone a Devart.Data.BigQuery.BigQueryCommand . To make sure all the properties are inherited, one of them (CommandText) is written to the console.
    public void CloneACommand()
    {
      BigQueryCommand bigQueryCommand = new BigQueryCommand("SELECT * FROM your_project.your_dataset.employees");
            BigQueryCommand bigQueryCommand2 = (BigQueryCommand)bigQueryCommand.Clone();
      Console.WriteLine(bigQueryCommand2.CommandText);
    }
    Public Sub CloneACommand()
      Dim bigQueryCommand As New BigQueryCommand("SELECT * FROM your_project.your_dataset.employees")
      Dim bigQueryCommand2 As BigQueryCommand = CType(bigQueryCommand.Clone(), BigQueryCommand)
      Console.WriteLine(bigQueryCommand2.CommandText)
    End Sub
    See Also