|
-
October 18th, 2001, 08:10 AM
#1
Copy User defined type
Hello, i have got an user defined type and would like to copy it into another type. I would like to have a copy and not a reference! Has anybody got a solution?
Type Address1
Name
Age
End Type
Dim Address1 As Address
Dim Address2 As Address
Address1.Name = A
Address1.Age = 2
Address2=Address1
If I now change the name of Address2 the name of Address1 changes, too (byref).
I would like to have a copy!
Thanks
-
October 18th, 2001, 08:40 AM
#2
Re: Copy User defined type
instead of using Equal you might want to do a class with the user defined type and add a method copy..
It should work that way. that copy returns a New object of that type.
Or you may wanna try this
Address2.Name = Address1.name
Address2.Age = Address1.Age
Nicolas Bohemier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|