What is the difference between VB6 and VB.
NET
There are quite a few differences in VB6 and [Link]. We will highlight some of t
hese here in points:
The greatest change in VB6 and [Link] is of runtime environment. VB6 used the VB-
Runtime while [Link] uses the .Net Common Language Runtime (.Net CLR). The CLR i
s much better designed and implemented than VB-Runtime. The CLR uses better code
translation through Just in Time compiler while VB-Runtime interprets the code.
The CLR Garbage Collector is also more efficient than VB6 one as it may detect
cyclic references too.
VB6 was interpreter based language while [Link] is a compiled language
VB6 was not a type-safe language while [Link] is a type safe language. There is n
o variant type in [Link] and no magical type conversions happen in [Link]
VB6 used On Error Goto syntax to handle exceptions at runtime. [Link] uses the Try Ca
tch Finally syntax to handle exceptions at runtime.
A lot of code (like user interface code) in VB6 was hidden from developer. In VB.
NET no code is hidden from developer and you can access and control each part of
your application
[Link] has much enhanced object oriented support than VB6
VB6 does not allow developing the multithreaded applications. In [Link] you can c
reate multithreaded applications.'''''''''''''
--------------------------------------------------------------------------------
---------------------------------
swaping of two numbers without using 3rd valiable
dim a,b,c as integers
a=2;
b=3;
c=9;
public sub addnumbers(byval a, byval b)
a= a+b
end sub
addnumbers(a,b)
messaebox(a)
#new value of the variable will bot be avaiable outside of the procedure -- byva
lues
public sub addnums(byref a,byref b)
a=a+b;
end sub
messagebox(c)