O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

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

7.5. Shared Methods and Class Math

As you know, every class provides methods that perform common tasks on objects of the class. For example, to display the grade information in a GradeBook object, we defined and called method DisplayGradeReport (Section 6.5). Recall that when we call GradeBook methods such as DisplayGradeReport, we first need to create a GradeBook object.

Although most methods of a class execute in response to method calls on specific objects, this is not always the case. Sometimes a method performs a task that does not depend on the contents of an object. Such a method applies to the class in which it is declared and is known as a Shared method or a class method. It is not uncommon for a class to contain a group of convenient ...

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