Chapter 3. Naming Conventions

New objects and data types continue to emerge as Microsoft Visual Basic grows in complexity. Program code often references controls as well as variables, and in complex procedures it can be difficult to fully understand everything that is occurring in the code. How do you determine whether a particular statement references a variable or a control? Without some sort of convention to differentiate variables from controls, code is more difficult to read. For example, can you tell what type of data is being manipulated in the following statement?

TotalDue.Text = LineItemTotal.Text - Discount + TotalTax

You could argue that using Option Strict aids clarity by making you cast data to appropriate types. This is true—to ...

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.