Using a New Class in an Application

Of course, a new custom class does no good if you do not use it in an application. To use your new class in an application, you must create a reference from the project in which you want to use the class to the project that contains the class. We’ll illustrate this point by adding a new test project to our sample class project.

Solutions

When you created the Class Library project earlier in this chapter, Visual Basic .NET automatically created a solution to contain that project. Simply put, a solution is a container for the projects that together comprise an application. Notice that the Solution Explorer window contains a solution named MyClasses, which was created as a container for (and named for) the ...

Get Special Edition Using Microsoft® Visual Basic® .NET 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.