Hello All,
I am wondering if it is possible to create a clone of a class instance without having to explicitly equate the properties of one instance to another.
I tried B4XSerialization and kept getting errors; Then I read that it cann't be used on class instances.
Somethink Like below
I know it can be done by equating the properties but for big classes with list of classes this would be tedious also everytime you would change your class you need to modify your cloning ...
Thanks
I am wondering if it is possible to create a clone of a class instance without having to explicitly equate the properties of one instance to another.
I tried B4XSerialization and kept getting errors; Then I read that it cann't be used on class instances.
Somethink Like below
B4X:
Dim cl1 as Class1
Dim cl2 as Class1
cl1.P1="Hello"
....
cl2=Clone(cl1)
cl2.P1="Hi"
Log(cl1.P1 ==> "Hello")
Log(cl2.P1 ==> "Hi")
I know it can be done by equating the properties but for big classes with list of classes this would be tedious also everytime you would change your class you need to modify your cloning ...
Thanks