Murach's Visual Basic 2005 How to create and use classes
This chapter shows you how to create your own Visual Basic
classes that include fields, properties, methods, constructors,
and shared members. While many competing books illustrate
these concepts with unrealistic objects such as automobiles
or animals, this book uses real-world business objects such
as products and customers.
In fact, this chapter presents an application
that uses a Product class to create Product objects and a
ProductDB class that uses shared methods to handle the application's
database access. That's the type of complete application that
you need to see if you want to understand object-oriented
programming in Visual Basic.
|
|
|
|
How classes can be used to structure
an application |
328 |
|
The members you can define within a
class |
330 |
|
The code for the Product class |
332 |
|
How instantiation works |
334 |
|
|
How to add a class file to a project |
336 |
|
How to code fields |
338 |
|
How to code properties |
340 |
|
How to code methods |
342 |
|
How to code constructors |
344 |
|
How to code shared members |
346 |
|
|
The operation of the Product Maintenance
application |
348 |
|
The classes used by the Product Maintenance
application |
350 |
|
The code for the Product Maintenance
application |
352 |
|
|
How to use the Class View window |
356 |
|
How to use class diagrams and
the Class Details window |
358 |
|
|
How to create a structure |
360 |
|
How to use a structure |
360 |
|
 |
|
|
|
|
© Copyright 1998-2008 Mike Murach &
Associates, Inc. All rights reserved.
|