How do I copy the contents of an object to a new instance of the same class?
e.g.
Dim c1 as new myclass
Dim c2 as myclass
c1.prop = "a"
c2 = c1
c2.prop = "b"
Console.Writeline (c1.prop) 'this returns "b"
I need to create 2 instances of the class, so changing the properties of c2 should not affect c1.
Start Free Trial