Clone Method (MailChimpConnection)
Creates a new object that is a copy of the current instance.
This example shows how to clone a
MailChimpConnection. To make sure all the properties are inherited, one of them (UserId) is written to the console.
|
|---|
public void CloneAConnection()
{
MailChimpConnection mailChimpConnection = new MailChimpConnection(
"api key=8b10fe893c9732d12befe0b7d846ffcb-us10;");
MailChimpConnection mailChimpConnection2 = (MailChimpConnection)mailChimpConnection.Clone();
Console.WriteLine(mailChimpConnection2.UserId);
} |
|
|---|
Public Sub CloneAConnection()
Dim mailChimpConnection As New MailChimpConnection( _
"api key=8b10fe893c9732d12befe0b7d846ffcb-us10;")
Dim mailChimpConnection2 As MailChimpConnection = CType(mailChimpConnection.Clone(), MailChimpConnection)
Console.WriteLine(mailChimpConnection2.UserId)
End Sub |