C
Chris Pratt
I'm sorry to ask such a fundamental question, but is it possible to create a
copy of an object in VB.Net 2005?
I have an app which, on load, creates an instance of a class, into which it
reads a load of data from XML. What I want is to be able to declare a new
instance of this class and make it a copy of the existing instance. This
way I can spawn various instances with their own updated properties
The code "Dim NewInst as MyClass = OldInst" creates a reference to the
existing instance and, therefore, changing any properties of NewInst are
reflected in OldInst.
Is there a simple way to do what I need?
Many thanks for any help.
copy of an object in VB.Net 2005?
I have an app which, on load, creates an instance of a class, into which it
reads a load of data from XML. What I want is to be able to declare a new
instance of this class and make it a copy of the existing instance. This
way I can spawn various instances with their own updated properties
The code "Dim NewInst as MyClass = OldInst" creates a reference to the
existing instance and, therefore, changing any properties of NewInst are
reflected in OldInst.
Is there a simple way to do what I need?
Many thanks for any help.