- 1). Open Visual Studio. Click "File" and select "New Project" from the drop-down menu. Click on "Class Library" in the New Project window and click "OK."
- 2). Click on "Project" from the menu and select "ClassLibrary1 Properties" in the drop-down list. Change the assembly name and root namespace from the generic naming to something more identifiable with your class.
- 3). Open your code window. Write the code for the functions your class will include. Make public functions if client applications will use them.
- 4). Click on "Build" from the menu and select "Build ClassLibrary1" in the drop-down list. This will create a DLL file with the name you typed in the assembly name text box. Close your project.
- 5). Create a new project by clicking on "File" and selecting "New Project." Select "Empty Project" and click "OK." Click on "Project" on the menu and select "Add Reference" from the drop-down list. Navigate to where you saved your DLL file, click on it and click "OK." This adds the public functions from your DLL file to your new project.
previous post