I have a class:and 2 instances of this class:VB Code:
Public Class MyClass Public myString as String Public myInt as Integer End ClassIf i write "o1 = o2" this will set o1 as a reference to o2 object, even if I allocated different memory segments for each one of them, right?VB Code:
Dim o1, o2 As New myClass
So, the question is how do I copy the information from o2 into o1. Something like:This code works, but if I would have had 100 fields in that class... how would I have done this?VB Code:
o1.myString = o2.myString o1.myInt = o2.myInt
Thank you.




Reply With Quote