Copying objects

  • Thread starter Thread starter Brook Young
  • Start date Start date
B

Brook Young

I am using vb .net and need to copy entire structures and
objects, not just make new references. What is the
best way to copy the values in the objects without making
my own copy subroutine that copies each element
individually.

It is my understanding that If I just
set obj A = B then A only contains a reference to
B and doesn't actually make a new copy. I have
looked in the help files extensively and
haven't found a definitive answer. It seems to me
that I have to deserialize the original object
somehow and then serialize it to the new object.
Any help would be appreciated.
 
Look into serializing your objects and passing them around. Check the help
file (ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconserialization.htm)
 
Back
Top