Clone Method (BigcommerceConnection)
Creates a new object that is a copy of the current instance.
This example shows how to clone a
BigcommerceConnection. To make sure all the properties are inherited, one of them (UserId) is written to the console.
|
|---|
public void CloneAConnection()
{
BigcommerceConnection bigcommerceConnection = new BigcommerceConnection(
"Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;");
BigcommerceConnection bigcommerceConnection2 = (BigcommerceConnection)bigcommerceConnection.Clone();
Console.WriteLine(bigcommerceConnection2.UserId);
} |
|
|---|
Public Sub CloneAConnection()
Dim bigcommerceConnection As New BigcommerceConnection( _
"Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;")
Dim bigcommerceConnection2 As BigcommerceConnection = CType(bigcommerceConnection.Clone(), BigcommerceConnection)
Console.WriteLine(bigcommerceConnection2.UserId)
End Sub |