've been listening with interest to the reactions that VB programmers have had to the new VB.NET environment and have been surprised to hear so many complain that VB.NET is a lot harder than VB. This is puzzling, because it doesn't match my experience at all. I've found that while .NET is frustrating at firstwhen you don't know the class hierarchy, and can't find an object or a method to perform a common taskafter a while you realize that not only is .NET not harderit's often easier than performing equivalent tasks in VB.Because performing VB tasks in the .NET framework is so much more consistent than it was in classic VB, I suspect that the learning curve for beginning programmers will be much shorter than it once was. Nowhere is the improved syntax clearer than with file IO, where to access a file, you can create a File object, immediately check if the file exists, open it, and read its contents (see item 10).
Despite the fact that VB.NET improves ease of use and increases power when working with the System classes, the loss of break, edit, and continue is a serious deficiency. Break-edit-continue is the best RAD tool. Rumor has it that the feature will reappear in Version 2 of VB.NET. I hope so, because, in my opinion, break-edit-continue, not syntax, is the main reason that classic VB has been so attractive to so many programmers for so long. With that said, Visual Studio's strong typing, syntax error markings, compiler warnings, and fast compile-edit cycle go a long way toward mitigating the loss, because they help prevent many errors before they occur.This article presents 10 tasks that are either easier, take less code, or are more powerful in VB.NET than in classic VB. There's no particular theme or hidden agenda behind these examples; they're simply pulled from my recent experiences with VB.NET and Visual Studio. I can assure you that there are far more than just 10. I have purposely avoided tasks that classic VB doesn't address intrinsically, such as creating a console application or a Windows service. I've also purposely avoided creating any classes so you can see that most common programming tasks don't require class creationjust as you don't have to create classes for common tasks in classic VB.