Understanding Visual Basic .NET Syntax

You’re almost ready to code your first Visual Basic .NET statements, but first you need to understand a few rules. These are the beginnings of Visual Basic syntax. If you don’t follow the rules, the compiler will reject your program and woe is you.

Lingo

In any language—programming, human, or otherwise—the rules that determine what’s valid and what’s not are its syntax.

As in most languages, the unit of code in Visual Basic is the statement. A statement is a command you give the computer to make it do something. The following statement, for example, declares a 32-bit integer named intCount:

Dim intCount As Integer

Lingo

A declaration is a statement that sets aside, names, and otherwise describes memory that you ...

Get Faster Smarter Beginning Programming 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.