Flylib.com

Books Software

 
 
 

- page 45

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Chapter 2.  Out with the Old, In with the New

Summary

The size of this chapter alone should indicate how extensive the changes to VB .NET are. Some people may try to play down the changes to VB .NET. In some ways, VB .NET is still VB, but if that's all anyone sees, they are missing the bigger picture.

In this chapter, you learned that VB .NET is an object-oriented system, having a root class of Object. All classes and structures inherit from the root Object class. You also learned that the Type idiom was replaced with the more powerful Structure idiom. Simple data types actually have lineage descending from Object and ValueType, making primitive types more advanced but just as easy to use as VB6 primitives.

If you find yourself feeling a little lost as you proceed with your study of VB .NET, return to this chapter for the basic information on fundamental changes to VB. Also check out Appendix A for resource information on migrating to VB .NET, more compatibility issues, and basic revisions to Visual Basic for .NET. Enumerations, structures, functions, and subroutine changes are explained in Chapter 5 in the form of what we can do in VB .NET.

Chapter 2 was written to provide you with a reference for programming changes at a general level. Now that you are aware of the differences beteween VB6 and VB .NET, Chapter 3 begins our focus on the powerful things we can do with .NET.


Team-Fly    
Top
 
Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Part I.  Introducing Visual Basic .NET


Chapter 3. Basic Programming in Visual Basic .NET

In This Chapter

  • Declaring and Initializing Variables

  • Working with Block-Level Scope

  • Static Variables

  • Using Static Variables

  • Using Arrays

  • Working with New Abstract Data Types

  • Shadow Variables

  • Functions and Subroutines

  • Defining Structures

  • Using Objects

  • Exception Handling

  • Summary

In this chapter, you'll get your first chance to write Visual Basic .NET code unencumbered with the coding practices and idioms of yesterday . We will use Visual Basic .NET code and only Visual Basic .NET code. Chapter 3 provides you with an opportunity to experiment and explore the basic programming concepts that are the molecules of every program.

This chapter looks at variable declaration and initialization, block scope, static variables, and more on arrays and abstract data types. I will also introduce you to the concept of shadow variables, and provide you with some more examples on defining procedures and structures. Near the end of this chapter, we will look at the new garbage collector and the impact it has on using objects. Finally, this chapter wraps up with comprehensive coverage of exception handling. Because you will use exception handling in all of the code you writethough perhaps not all proceduresyou need to master the concepts of exception handling early.


Team-Fly    
Top