
assignment operator for VB - URGENT
Hi Domenico:
Quote:
>I think Set Class1 = Class2 merely set a new reference to the existing
>class
Nope.
If you examine the code I posted, a *new* class instanance is created.
Quote:
>> Dim NewC1 As New Class1
The logic of the Clone event then allows for updating the *new* instance
with the value from the *existing* instance.
Quote:
>> ...intialize new class with values from this class
The Set statement assigns the *new* instance to the return value.
Quote:
>> Set Clone = NewC1
Doug.