Using VB6 Functions in VB.NET

Mehyar

Well-known member
Joined
Jun 9, 2003
Messages
371
Location
Lebanon
I always see experienced developers discouraging the use of VB6 functions in .NET whenever there is a .NET equivalent.

Now I need to know, is this because we use .NET and thus we are biased to it (Object oriented ...), or truly there is a performance overhead on using VB6...
 
Personally I avoid the VB6 functions because I work with both VB and C# so I find it easier to work with just one set of commands.
Commands like CInt do call into the VisualBasic Dlls so there is probably an associated performance hit.
 
Is VisualBasic Dll come together with .NET Framework? Actually I did heard about it will cause the performance issue. Since .NET has equivalent functions, then why not just use .NET functions? Maybe next version of .NET Framework wont cater for VB functions?
 
Ok Robby, I read this, the first part I already knew but the second part shocked me (passing parameters) !!!

I always thought VB.NET behaved like Java in these issues (Java is my native university language). But this is ridiculious why did Microsoft follow this implementation.

Moreover, I have a question. By default objects are passed by reference, even if you explicitly use the Byval keyword, do they follow what is said in the article ? If this is the case then we should avoid at all objects as parameters in VB.NET, and this draws some limitations while programming in VB.NET which I found as powerful as Java but with easier syntax...

This is really disappointing ....
 
Actually all objects are passed ByVal by default, ByRef only if explicitly declared(Opposite to Visual Basic 6). The article points out the stupid method Microsoft used for ByRef but its ByVal by default, they may have been trying to avoid using pointers since one of the things Microsoft keeps pushing about .Net is that it doesnt use pointers.
 
Back
Top