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

4.5. Instance Variables and Properties

In Chapter 3, we declared all of an application’s variables in the Main method. Variables declared in the body of a particular method are local variables and can be used only in that method. When a method terminates, the values of its local variables are lost. In contrast, an object’s attributes are carried with the object as it is used in a program. Such attributes exist before a method is called on the object, while the method is executing, and after the method completes execution.

Attributes are represented as variables in a class declaration. Such variables are called instance variables and are declared inside a class declaration but outside the bodies of the class’s other members, such as methods (and ...

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