Chapter 2. The Visual Basic Language
When Visual Basic .NET first appeared, loyal VB developers were shocked to find dramatic changes in their favorite language. Suddenly, common tasks such as instantiating an object and declaring a structure required new syntax, and even basic data types like the array had been transformed into something new. Fortunately, Visual Basic 2005 doesn't have the same shocks in store. The language changes in the latest version of VB are refinements that simplify life without making any existing code obsolete. Many of these changes are language features imported from C# (e.g., operator overloading), while others are completely new ingredients that have been built into the latest version of the common language runtime (e.g., generics). In this chapter, you'll learn about all the most useful changes to the VB language.
Use the My Objects to Program Common Tasks
The new My
objects
provide easy access to various features that developers often need but
don't necessarily know where to find in the sprawling .NET class
library. Essentially, the My
objects
offer one-stop shopping, with access to everything from the Windows
registry to the current network connection. Best of all, the My
object hierarchy is organized according to
use and is easy to navigate using Visual Studio IntelliSense.
How do I do that?
There are seven first-level My
objects. Out of these, three core objects centralize functionality from the .NET Framework and provide computer information. These ...
Get Visual Basic 2005: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.