Clone Method (ZohoConnection)
Creates a new object that is a copy of the current instance.
This example shows how to clone a
ZohoConnection. To make sure all the properties are inherited, one of them (UserId) is written to the console.
public void CloneAConnection()
{
ZohoConnection zohoConnection = new ZohoConnection(
"API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0");
ZohoConnection zohoConnection2 = (ZohoConnection)zohoConnection.Clone();
Console.WriteLine(zohoConnection2.UserId);
}
Public Sub CloneAConnection()
Dim zohoConnection As New ZohoConnection( _
"API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0")
Dim zohoConnection2 As ZohoConnection = CType(zohoConnection.Clone(), ZohoConnection)
Console.WriteLine(zohoConnection2.UserId)
End Sub