Example:
Custom Class "myClass"
How to create new variable of "myClass" type:
Dim var1 as myClass
set var1 = new myClass
What I want:
After manipulating var1
's properties, create var2
as a copy of var1
's current state.
What I tried:
(assuming var1
has already been manipulated)
dim var2 as myClass
set var2 = var1
However this ended up in what I think is a set by reference value because whatever I did to var2
after this point, also changed var1
. How can I set var2
to be equal to var1
by value?