O'Reilly logo

Professional Visual Basic® 2010 and .NET 4 by Kent Sharkey, Rob Windsor, Gastón C. Hillar, Jonathan Marbutt, Billy Hollis, Bill Sheldon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Objects and Visual Basic

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Object Oriented Terminology

  • Composition of an Object

  • Characteristics of Value Types versus Reference Types

  • Primitive Types

  • Commands: If Then, Else, Select Case

  • Common Value Types (Structures)

  • Common Reference Types (Classes)

  • XML literals

  • Parameter passing ByVal and ByRef

  • Variable scope

  • Working with Objects

  • Understanding Binding

  • Data type conversions

  • Creating Classes

  • Event Handling

  • Advanced Object Oriented Programming

  • Using Lambdas

Visual Basic supports the four major defining concepts required for a language to be fully object-oriented:

  • Abstraction — Abstraction is merely the ability of a language to create "black box" code, to take a concept and create an abstract representation of that concept within a program. A Customer object, for instance, is an abstract representation of a real-world customer. A DataTable object is an abstract representation of a set of data.

  • Encapsulation — Encapsulation is the concept of a separation between interface and implementation. The idea is that you can create an interface (public methods, properties, fields, and events in a class), and, as long as that interface remains consistent, the application can interact with your objects. This remains true even when you entirely rewrite the code within a given method — thus, the interface is independent of the implementation. The publicly exposed interface becomes what is known as a contract. It is this contract that you will look to limit changes to for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required