Faster Coding with the "My" Object in Visual Basic 2005
- VB 6 Versus Visual Basic .NET
- Changing a Class
- The Project
- The Challenges
- The New Kid: TextFieldParser
- Why Use the My Object?
- Summary
For more information on .NET, visit our .NET Reference Guide or sign up for our .NET Newsletter.
A few months ago, I wrote a series of weblogs on Informit regarding transitioning from VB 6 to Visual Basic .NET. I wanted to know why a few developers were hanging back. The blog and the responses seemed well received, and I got some fantastic views on transitioning to .NET or staying put with VB 6.
Before that, I had taken a "Train the Trainer" class with Microsoft, part of my Microsoft Most Valuable Professional privileges. What I saw there convinced me (and many other MVPs) that VB 2005 is the VB to rush to adopt. There are many built-in benefits, but the My object is the best benefit for the VB 6 coder looking for a friendlier, fast approach to .NET coding. And the best news for us Visual Basic diehards is this: It's only available to Visual Basic developers! By the end of this article, I think you'll be impressed with the many helps that the My object provides. Who knows? You might even pick up Visual Studio Beta 2 and decide to try out some of the tricks and objects in this article.
VB 6 Versus Visual Basic .NET
Ask really skilled VB 6 coders why they balk at learning .NET, and many will state that the first .NET versions had too steep a learning curve. Common tasks such as file I/O operations seemed to take too much time to learn. Some people even felt that the object-oriented programming compliance and "feel" made VB seem less friendly.
This is a major concern for diehard VB 6 coders: They missed the ability to install and code right away. The examples seemed a bit obscure, maybe theoretical. Information for common tasks was hard to find. The interface seemed alien and strange. These comments came from folks who were more than willing to accommodate the changes from version 4 to version 6, for example.