Thank you for helping me to put this more clearly.
I have a class with multiple attributes of different datatypes. Some have simple datatypes (String, Int, etc.). Other attributes have a type of another class or a List.
For example a ClassA might look like this:
Sub Class_Globals
Public id As Int
Public name As String
Public objB As ClassB
Public lstObjsC As List
End Sub
When creating objects of this ClassA they will have simple values (id, name) and references to other objects (objB, lstObjsC). The referenced objects also have references to other objects. This results in an object tree with a root object of ClassA.
I need to make a clone of the root object that includes a clone of the whole object tree. Is there a better way to do this than implementing a clone operation in each involved class and call them recursively?
Thanks,
Thomas