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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top