|
-
April 3rd, 2003, 11:46 AM
#1
converting between VB6 and VB .NET
Hi,
I have installed Visual Studio .NET and i want to build a VB project, the problem i encountred is :
i couldn't use the Variant type and every Variant is changed by Object, this type object causes errors when executing...
how can i use the same type or use a similar type a variant.
-
April 3rd, 2003, 02:17 PM
#2
Well that is one of the big changes in VB.NET. No more slow and un-optimized VARIANT type. Remember that all .NET languages must conform to the .NET data types and VARIANT is not one of them.
You basically have to change all VARIANT type to OBJECT and then use CTYPE() or DIRECTCAST() functions to convert them to the right TYPE when you need to use it. .NET is STRONGLY TYPED.
-Cool Bizs
-
April 3rd, 2003, 03:29 PM
#3
If you're using a lot a variant data types the code should/could be re-writen using "real" types. This will improve performance, stability, readability and maintainability. Variants always have been a "bad practice".
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
|