Language: OO Features in Visual Basic .NET

This solution demonstrates some of the new object oriented (OO) features in VB.NET. Press F5 to start the application in Debug mode using the breakpoints. Press Ctrl+F5 to run the program and ignore the breakpoints.

Featured Highlights

Each button on the main form represents a different OO feature in VB.NET. Run the application and click each button to invoke the breakpoints within the code. Step through the code and examine the usage. The five major areas covered are:

Each major area has its own class and source file. However, in Visual Basic .NET is would have been fine to have all five classes in one source file.

Note this sample has extensive comments in the source code. 

Requirements

Requires the Trial or Release version of Visual Studio .NET Professional (or greater).

Running the Sample

When you run the example from within Visual Studio .NET, the debugger will be invoked via breakpoints for each button. You can selectively turn the breakpoints on and off by using the Breakpoints Window, accessible via the Debug | Windows | Breakpoints menu command or the CTRL+ALT+B keystroke. In the code samples, the new Framework version of MsgBox (MessageBox from the System.Windows.Forms namespace) is used. In Visual Basic .NET applications, MsgBox will continue to work fine. However, C# and other languages do not expose MsgBox. Use MessageBox instead in these cases. 

Last Update: 15 July 2002