Pages

Wednesday, November 30, 2011

Create more flexible applications with class libraries (VB .NET)

A .NET class library, or component, is a collection of one or more classes compiled together as a unit. Class libraries allow you to create "pluggable" applications where you can debug, enhance, replace, and modify components individually without having to rebuild the entire application. You can use a class library for your business logic, common formatting functions, and more.

To create a class library:
  1. Create a new project in Visual Studio .NET
  2. Select class Library from the New Project dialog box
  3. Choose a name and location for your library and click the OK button
By default, .NET starts you off with one class but, you can add as many classes to the library as you like. When you're done, select Build | Build Solution from the menu to save the class library file (DLL) in the bin folder of your class' location.

You can deploy a class library to any client machine that has the .NET Framework installed. To do so, simply copy the DLL files to the client machine. Unlike COM applications of old, you don't have to register class libraries to use them.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.