Click here to Skip to main content
15,910,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I assign one object to another by value in VB.Net? By default a reference is passed rather than copying the contents. I am trying to copy a word document object to another using = sign. I do not want to keep a reference to original document, rather I need them as two different objects with same content so that I can manipulate them independently. Thanks
Posted

 
Share this answer
 
Have a look at the ICloneable interface (msdn link here[^]).
 
Share this answer
 
Thank you for the response. I need something similar to this. but ICloneable can only be implemented in a class that we create, right? (correct me if I am wrong). Can I make a clone of a COM object?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900