Post

VB'ified (Definition Of...)

I’ve used this term previously and some people have asked “What exactly does VB’ified mean”?

VB’ified is a term I use to describe code that has been modified to “feel” like VB. This may sound simplistic at first glance; however, there’s a lot of areas where this term apply. So let me point out a few of them:

Window Forms

Instead of blindly taking a C# Windows Form and converting it to VB, where much of the “Forms Designer Generated Code” may be scattered across a few area, refactor the code so that it is structured as if you created a new form from scratch using the designer. Switch code to use Handles instead of AddHandler/RemoveHandler. Utilize Form_Load where appropriate (yes, I use Form_Load since that is still the default event handler for a form when you double click on it… unless there is a specific reason for it to be avoided based on the project type).

Structure

Remove unnecessary Imports (ones that are already included by default in VB projects).

Intrinsic Functionality

Utilize as much of the intrinsic functionality provided by the language. For example, use MsgBox instead of System.Windows.Forms.MessageBox.Show. Use Handles instead of AddHandler (unless a reason to do otherwise). Use Cxxx instead of System.Convert.xxx. Use My functionality where possible/appropriate.

Code Format and Naming Guidelines

Of course, as I’m converting code, I make every attempt to conform to my own guidelines. ;-)

Summary

In the end, VB’ified refers to completely porting a project so it not only functions, but it appears as if it were originally written in VB; thus VB’ified.

This post is licensed under CC BY 4.0 by the author.