|
-
Jan 14th, 2004, 08:04 PM
#1
Thread Starter
Junior Member
compare UDT
HI everyone
I have two instance of a UDT (user defined type) that I need to compare. The UDT contains variable-length strings, longs, integers, singles, and booleans, altogether about 50 data members.
I need to compare the two and determine if any data members have different values. If any data member is different, I need the name of the data member and the values.
I could write if statements to access each member and compare it, but doing that 50 times is pretty cumbersome. Is there a more elegant method?
I'm running VB6.
suggestions are apprecaited
-
Jan 14th, 2004, 09:12 PM
#2
The picture isn't missing
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jan 15th, 2004, 12:45 PM
#3
Thread Starter
Junior Member
are you saying its possible with vb.net?
-
Jan 15th, 2004, 01:51 PM
#4
Frenzied Member
Even if you did a byte-by-byte comparison they would never be equal. When you use a variable length string, you are actually referencing a Long that contains the address of the first byte of a Unicode character array. So, the corresponding strings in each UDT will contain different addresses
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
|