Chapter 5. Variables

Programming often involves manipulating variables. Most procedures contain at least one variable, and some have dozens. Because variables are so common, they’re often taken for granted. In Chapter 3, “Naming Conventions,” I discussed using Hungarian prefixes to denote the data types of variables. Although using these prefixes should be mandatory whenever the variables are private to a class or module, it’s only the beginning of properly handling variables. A well-defined variable has a clearly defined data type and scope. In addition, to correctly use variables you must explicitly declare them using intelligent variable names and you must give them focus.

Goals of Using Variables Appropriately

The goals of explicitly declaring ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition 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.