'Declaration Public Function Clone() As MagentoConnection
public MagentoConnection Clone()
Return Value
A new MagentoConnection object.
'Declaration Public Function Clone() As MagentoConnection
public MagentoConnection Clone()
Creates a new MagentoConnection object with the properties that have the same values as those of the original object. However, changing properties of the new object has no influence on the values of the same properties of the original object.
Note that state of the new instance is always Closed, regardless of the state of original instance.
public void CloneAConnection() { MagentoConnection magentoConnection = new MagentoConnection( "domain=192.168.10.68/magento;user=Test;apikey=testpassword;"); MagentoConnection magentoConnection2 = (MagentoConnection)magentoConnection.Clone(); Console.WriteLine(magentoConnection2.UserId); }
Public Sub CloneAConnection() Dim magentoConnection As New MagentoConnection( _ "domain=192.168.10.68/magento;user=Test;apikey=testpassword;") Dim magentoConnection2 As MagentoConnection = CType(magentoConnection.Clone(), MagentoConnection) Console.WriteLine(magentoConnection2.UserId) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2