Clone Method (SqlShimCommand)
Creates a new object that is a copy of the current
SqlShimCommand instance.
Return Value
A new
SqlShimCommand object in which all property values are the same as the original.
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 |