Chapter 2: Visual Basic 2005 Core Elements


Overview

This chapter looks at the core elements that make up Visual Basic. Every software development language has unique elements of syntax and behavior. In Visual Basic 2005, many of these elements have evolved since the original Basic and the decade that’s passed since it was introduced. Accordingly, Visual Basic has its origins in traditional procedural-based programming languages.

However, with the release of Visual Basic for .NET, Visual Basic completed a paradigm shift that began several releases earlier. With .NET, the Visual Basic language was truly extended to reference object-oriented development. The object paradigms extend what we’ll call the core elements of the language. Therefore, while a very brief introduction to the existence of classes and objects within the language is presented in this chapter, the key concepts of object-oriented development are presented in detail in Chapters 3 and 4.

This chapter focuses on the core elements of the language and answers questions those not familiar with Visual Basic might ask, such as where semicolons should be placed. The areas of focus for this chapter include the following:

  • Initial syntax and keywords to understand the basic language elements

  • Value versus reference types

  • Primitive types

  • Value types (structures)

  • Reference types (classes)

  • Boxing

  • Parameter passing ByVal and ByRef

  • Datatype conversions

  • Commands: If Then Else, Select Case, For Each, For Next, Do While

The main goal of this chapter is to familiarize you with Visual Basic. The chapter begins by looking at some of the keywords and language syntax you need. Experienced developers will probably gloss over this information, as this is just a basic introduction to working with Visual Basic. After this, the chapter discusses value types and reference types, explaining the underlying difference between how these objects are stored. This is important information for understanding concepts such as boxing and generics. The chapter then provides a clear definition of a logical grouping of objects called primitive types. Finally, it discusses details of value and reference objects and how they are used, moving on to some common command and control statements for Visual Basic.




Professional VB 2005 with. NET 3. 0
Professional VB 2005 with .NET 3.0 (Programmer to Programmer)
ISBN: 0470124709
EAN: 2147483647
Year: 2004
Pages: 267

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net