9.13. Time Class Case Study: Creating Class Libraries

We have seen that classes from preexisting libraries, such as .NET’s Framework Class Library (FCL), can be imported into Visual Basic applications. Each class in the FCL belongs to a namespace that contains a group of related classes. Class libraries and namespaces facilitate software reuse by enabling applications to add classes from other namespaces (as we have done in most examples). This section demonstrates how to create your own class libraries for reuse.

Making a Class Reusable

Before a class can be imported into multiple applications, it must be placed in an assembly to make it reusable. The steps for creating an assembly are as follows:

  1. Create a Class Library project.

  2. Add the reusable ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.