[Gambas-user] How to clone an object?

martin p cristia tercoide at hotmail.com
Fri Apr 24 00:19:47 CEST 2020


I want a clone an object I dont know what Class it is.

Public c1 as New Clase1                    ' These classes may have 
arrays of other classes Object[]
Public c2 as New Clase2                   ' All diffent
Public c3 as New Clase3
Public c4 as New Clase4


' at this point we don't know
Public Function ClonMe(original as Object) as Object

' a New object of the same kind with all variables/properties and 
constants with the same values
?????

End



-- 
Saludos

Ing. Martin P Cristia



More information about the User mailing list