assignment operator for VB - URGENT 
Author Message
 assignment operator for VB - URGENT

does exist an equivalent of C++ assignment operator for VB objects ?

I need to istantiate an identical copy of an existing object. Is there
another way to do a member-to-member copy ?
This way means to have all members public (terrible !!!)

P.S. sorry for my bad English

thanks in advance

Claudio



Sun, 13 Feb 2000 03:00:00 GMT  
 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.


Mon, 14 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Assignment operator - Could someone explain?

2. Operators in the assignment

3. Urgent! Need help on assignment - Embedding SQL

4. Urgent- Like operator doesnt work

5. URGENT: ADO problems with 'LIKE' operator

6. Adding an assignment and a resource to this assignment

7. VB Addressof operator to VB.NET delegate

8. Outlook/VB Tasks - I need to Cancel Assignment

9. VB Assignment.

10. VB-NY CONSULTING ASSIGNMENT--EXCELLENT RATES

11. HELP with my VB ASSIGNMENT

12. Excel/Office/VB: DocumentProperties Assignment Problem

 

 
Powered by phpBB® Forum Software