New Features
Inheritance
One of the biggest enhancements in the .Net platform is the ability to use
Inheritance. VB5 introduced "interface inheritance" which allowed VB
developers some ability to extend existing objects. Unfortunately it only provided
access to the interface and not the underlying implementation.
In VB5 or VB6, for example, you could create an "Person" object that
handled basic properties such as Name, Address,Age, etc. If you then wanted to
create new objects, such as "Employee", "Student", "Customer"
or whatever you could not simply extend the existing Person object. Instead,
you had the choice of duplicating the code in the new objects or using delegation
by having the new object create an instance of the "Person" object
and calling it's methods and properties whenever your code called methods or
properties of the extended object.
With VB.Net we now have full inheritance. Your "Employee" object,
for example, can inherit the "Person" object along with all of the
debugged code it contains to validate, save and retrieve the data it manages.
You can then just add the new features that you need to support an "Employee".
You can also override, overload or shadow methods and properties of the base
class if you need to alter the standard behavior in some way.
Inheritance also applies to visual objects like controls and forms. It will
be possible in VB.Net to create a base form that includes corporate logos, standard
menus, help systems, etc and then inherit from them to create application-specific
forms that have the identical look and feel as all other forms.
Console Applications
VB.Net can easily create true console applications making it possible to write
components to be called from command lines, logon scripts or batch processes
and have them interact with the standard input and output files.
Delegates
A "delegate" in VB.Net acts somewhat like function pointers in C;
they allow you to pass procedure references around and to call those procedures.
This can be a very powerful technique, allowing you to call custom sort or other
processing routines without needing to hard-code IF or Select blocks.
Function Overloads
VB.Net offers developers the ability to overload functions to provide different
functionality based on the number of type of arguments passed. In earlier versions
of VB this was often done using optional parameters or ParamArrays but often
required a fair amount of coding to determine what was passed and changes could
be awkward to implement without breaking compatibility. With VB.Net it is possible
to have multiple procedures with the same name but different argument "signatures"
that allow the compiler to determine which routine is being called.