Chapter 3. Language Fundamentals
Chapter 2 demonstrates a very simple Visual Basic .NET program. Nonetheless, there is sufficient complexity in creating even that little program that some of the pertinent details had to be skipped over. This chapter illuminates these details by delving more deeply into the syntax and structure of the Visual Basic .NET language itself.
This chapter discusses the type system in Visual Basic .NET, drawing a distinction between built-in types (Integer, Boolean, etc.) and user-defined types (types you create, such as classes and interfaces). The chapter also covers programming fundamentals such as how to create and use variables and constants. It then goes on to introduce enumerations, strings, identifiers, expressions, and statements.
The second part of the chapter explains and demonstrates the use of
branching, using statements such as If
,
Do
,
Do
...While
, and
For
. Also discussed are operators, including the
assignment, logical, relational, and mathematical operators. Although
Visual Basic .NET is principally concerned with the creation and
manipulation of objects, it is best to start with the fundamental
building blocks: the elements from which objects are created. These
include the built-in types that are an intrinsic part of the Visual
Basic .NET language as well as the syntactic elements of Visual Basic
.NET.
VB.NET Versus VB6
If you’re an experienced VB6 programmer, you might be tempted to skim through this chapter. However, you should take note ...
Get Programming 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.