Chapter 4. Exploring Object-Oriented Programming

In This Chapter

Understanding object-oriented programming

Creating your own objects and classes

Working with shared members

Visual Basic.NET (VB.NET) traces its roots way back to the early 1960s, long before anyone had ever conceived of object-oriented programming. However, unlike most programming languages from that era (such as FORTRAN and COBOL), Visual Basic evolved into a thoroughly object-oriented programming language.

In this chapter, I introduce some of the basic concepts of object-oriented programming and show you how these basic concepts work in VB.NET.

Introducing Object-Oriented Programming

One of the oldest concepts of programming is the idea of modularity. The basic idea of modularity is that you can often solve a large problem by breaking the problem down into several smaller problems. You can easily write code to implement each of the smaller pieces and then combine the pieces to solve the entire problem. But how do you keep track of the pieces?

In early programming languages, the pieces were simple procedures. Procedures are useful, but it’s difficult to coordinate programs that consist of hundreds, thousands, or even tens of thousands of procedures. Object-oriented programming attempts to ease this burden by applying additional structure to the individual pieces that make up an application.

In object-oriented programming, the pieces that make up an application are called objects, and they have certain basic characteristics. ...

Get ASP.NET 2.0 All-In-One Desk Reference For Dummies® 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.