I am quite new to VB.net programming. I am currently dealing with a problem which I hope someone can help me solve...
In my code, I have created a class that includes several public variables, like integers and strings, etc. I assign different values to them throughout the code. However, I don't seem to be able to create a second copy of this object variable by simply using the equal sign, i.e.:
ClassVariable2 = ClassVariable1
It appears to me that the above operation creates a reference to ClassVariable1, since changing it will also change ClassVariable2. What am I missing in my code? I have also made sure that I instantiate ClassVariable2 with New keyword before assignment...
any suggestions will be highly appreaciated.
A.
In my code, I have created a class that includes several public variables, like integers and strings, etc. I assign different values to them throughout the code. However, I don't seem to be able to create a second copy of this object variable by simply using the equal sign, i.e.:
ClassVariable2 = ClassVariable1
It appears to me that the above operation creates a reference to ClassVariable1, since changing it will also change ClassVariable2. What am I missing in my code? I have also made sure that I instantiate ClassVariable2 with New keyword before assignment...
any suggestions will be highly appreaciated.
A.