Public Sub DeepCopy(ByVal value As [Type])
Public Shared Sub DeepCopy(ByVal leftSide As [Type], ByVal rightSide As [Type])
public void DeepCopy([Type] value)
public static void DeepCopy([Type] leftSide, [Type] rightSide)
Above, [Type] is a placeholder for the type of the object to be copied.
The DeepCopy method is a member of many classes in GeoCalcNET. It produces a deep-copy of the specified object. A deep-copy is one in which all member objects are cloned so that they are distinct from the members of the original object. In contrast, a shallow-copy is one in which the references to member objects are copied so that the copy has the same members as the original.
There are two signatures for this method. The first one takes a single argument which is the object to be copied. The argument must have the same type as the current instance, because the resulting copy is stored in the current instance. The second signature takes two arguments of the same type. The first argument is the object that will be filled with values copied from the second argument, which is the original.
The following example shows the use of the DeepCopy method for the ProjectedCoordSys object, but the usage is the same for all objects.
Private Sub GeoCalcNET_DeepCopy(ByVal originCS As GeoCalcNET.ProjectedCoordSys)
Dim copyCS As New GeoCalcNET.ProjectedCoordSys
copyCS.DeepCopy(originCS)
GeoCalcNET.ProjectedCoordSys.DeepCopy(copyCS, originCS)
End Sub
private void GeoCalcNET_DeepCopy(GeoCalcNET.ProjectedCoordSys originCS)
{
GeoCalcNET.ProjectedCoordSys copyCS = new GeoCalcNET.ProjectedCoordSys();
copyCS.DeepCopy(originCS);
GeoCalcNET.ProjectedCoordSys.DeepCopy(copyCS, originCS);
}