Variable Naming

In the past, Microsoft favored a variation of Hungarian notation when naming variables. That meant, for example, that a Visual Basic integer variable would start with the prefix int (as in intCount). But in the world of .NET, memory management is handled automatically, data types can change without any serious consequences, and the majority of variables are storing references to full-fledged objects. Hungarian notation is starting to show its age.

The new Microsoft standard is to avoid variable prefixes, especially for properties and methods visible to other classes. This style is similar to the standard used for COM components and controls, and it makes a great deal of sense for code transparency. Data types no longer pose the ...

Get Microsoft® Visual Basic® .NET Programmer's Cookbook 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.