O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

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

Class Methods Defined

In the first chapter of Part III we defined a class as being a set of objects that share common attributes and behavior. Objects that are part of this set are known as instances of the class. You have so far learned that the attributes of a class are implemented as fields and properties. You know now that fields hold the data for an object (the object state) and properties provide controlled access to this state.

In this chapter you will look at the behavior, which is the second dimension of classes. Behavior means describing what an instance of the class (an object) can do. For example a horse can trot, jump, eat, and so on. All horses can perform these actions. The set of all the actions that the objects of a class can ...

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