No discussion of Visual Studio .NET would be complete without a mention of the Microsoft .NET Framework software development kit (SDK). The two products are different but intimately related. Visual Studio .NET is an application-development tool for writing applications; the .NET Framework provides the infrastructure required to run those applications. Technically, you don't need Visual Studio .NET to write .NET Framework applications. If you weren't in any hurry, you could write them in Notepad or any other text editor and use the .NET Framework SDK command-line tools to compile them. However, this approach is the development equivalent of a little red wagon compared with Visual Studio .NET's shiny new BMW Z3. Some of the .NET Framework SDK's core enhancements lie in the new .NET-enabled languages. Let's look at three of them.

C#: A Safer, More Productive C


Based on a syntax that combines the best of Java and C++, C# is the de facto standard language for .NET development. Microsoft used managed code written in C# to develop the Common Language Runtime (CLR), which is the runtime layer that .NET applications use to interact with the OS. Microsoft designed C# to be a safer and more productive programming language than its predecessor, C++. First, C# is integrated with the design environment, giving it the same visual design capabilities that Visual Basic (VB) has long enjoyed. Also, C# incorporates many features that helped Java become a popular enterprise-development language. C# variables are type-safe (i.e., data types can only be accessed in a predefined manner) and automatically initialized by the environment. Garbage collection relieves the programmer of the responsibility of manual memory management. And C# supports the Throw...Try...Catch structured error-handling model. However, whereas Java has always been hampered by Sun Microsystems' refusal to turn it over to a standards body, Microsoft released both C# and the Common Language Infrastructure (CLI) to ECMA, the international standards organization. This open standard lets independent software vendors (ISVs) develop C# and CLR implementations.

Visual Basic .NET: Object-Oriented VB


VB, too, has undergone significant changes in its evolution into a .NET development language. In fact, the changes in Visual Basic .NET are so substantial that you're probably better off viewing Visual Basic .NET as an entirely new language with a familiar syntax. Unlike earlier VB releases, Visual Basic .NET is fully object oriented. In keeping with the .NET cross-language theme, Visual Basic .NET can readily inherit from objects created in other .NET languages and can create classes and objects that other .NET languages can inherit. Visual Basic .NET also supports other object-oriented features such as method overrides, overloading, and polymorphism. Another welcome enhancement is support for creating multithreaded applications. The extent of the language enhancements in Visual Basic .NET is beyond the scope of this article, but Figure A shows some primary differences between VB 6.0 and Visual Basic .NET.

Visual Studio .NET includes an application-migration wizard to help you migrate your existing VB projects to Visual Basic .NET; however, I found the results of using this tool disappointing. Instead of converting the standard COM components into their native .NET equivalents, the wizard merely attempts to put a COM wrapper on the old project's ActiveX controls—basically leaving all the heavy lifting to you.

As you might expect, in the process of morphing VB into Visual Basic .NET, Microsoft had to make some trade-offs. One result is the loss of the interpreted design environment, in which the running program immediately executes changes you make in the code environment. This feature made the design environment very productive because it shortcut the edit-compile-run-debug cycle. Being a compiled (rather than interpreted) language, Visual Basic .NET doesn't provide this functionality, but it provides far better language capabilities and improved performance. Although it lacks backward compatibility with existing VB projects, Visual Studio .NET, in conjunction with the .NET Framework SDK, makes significant strides in the areas of language development for Visual Basic .NET and C#.

VC++: Managed and Unmanaged Code


Unlike the other .NET languages, which create only managed code that needs the CLR to run, Visual C++ (VC++) can produce both managed and unmanaged code. The new managed code project types include a Managed C++ Application, a Managed C++ Class Library, a Managed C++ Web Service, and a Managed C++ Empty project. As in previous versions of VC++, the unmanaged code projects include an Active Template Library (ATL) Project, an ATL Server Project, a Custom Wizard, an Extended Stored Procedure DLL, a Makefile Project, an MFC ActiveX Control, an MFC Application, an MFC.DLL, an MFC ISAPI Extension DLL, and a Win32 Project. Also unmanaged is a new ATL Web Server Service Project. VC++ doesn't share the visual design environment that C# and Visual Basic .NET support, but its unmanaged code projects are fully backward-compatible with existing VC++ projects. VC++ has always been a fully object-oriented language, and VC++ managed projects share in the cross-language productivity enhancements in the .NET Framework. With VC++, you can create objects that Visual Basic .NET or C# solutions can inherit.