Clone Method (MailChimpCommand)
Creates a new object that is a copy of the current
MailChimpCommand instance.
Return Value
A new
MailChimpCommand object in which all property values are the same as the original.
This example shows how to clone a
MailChimpCommand . To make sure all the properties are inherited, one of them (CommandText) is written to the console.
|
|---|
public void CloneACommand()
{
MailChimpCommand mailChimpCommand = new MailChimpCommand("SELECT * FROM Folders");
MailChimpCommand mailChimpCommand2 = (MailChimpCommand)mailChimpCommand.Clone();
Console.WriteLine(mailChimpCommand2.CommandText);
} |
|
|---|
Public Sub CloneACommand()
Dim mailChimpCommand As New MailChimpCommand("SELECT * FROM Folders")
Dim mailChimpCommand2 As MailChimpCommand = CType(mailChimpCommand.Clone(), MailChimpCommand)
Console.WriteLine(mailChimpCommand2.CommandText)
End Sub |