Question: Assignment 1 6 - 2 Create and use a class library In this exercise, you ll create a class library that includes the InventoryItem and

Assignment 16-2 Create and use a class library
In this exercise, youll create a class library that includes the InventoryItem and InventoryDB
classes. Then, youll use that class library with the Inventory Maintenance app.
Create the Class Library project
1. Create a new Class Library project named InventoryLibrary in the
ExtraStarts\Ch16\InventoryMaintenanceLib directory.
2. Delete the empty Class1.cs class, and add the InventoryItem and InventoryDB classes
from the Inventory Maintenance project in the same directory.
3. Change the namespace in both of the classes you just added so its a namespace named
Inventory nested within a namespace with your last name.
4. Generate a file that will allow any XML documentation in the class library to be visible
to any code that uses the library.
5. Change the solution configuration for the class library to Release, and then build the class
library. When youre done, close the solution Assignment 16-2 Create and use a class library
In this exercise, you'll create a class library that includes the InventoryItem and InventoryDB classes. Then, you'll use that class library with the Inventory Maintenance app.
Create the Class Library project
1. Create a new Class Library project named InventoryLibrary in the ExtraStarts\Ch16 InventoryMaintenanceLib directory.
2. Delete the empty Class 1.cs class, and add the InventoryItem and InventoryDB classes from the Inventory Maintenance project in the same directory.
3. Change the namespace in both of the classes you just added so it's a namespace named Inventory nested within a namespace with your last name.
4. Generate a file that will allow any XML documentation in the class library to be visible to any code that uses the library.
5. Change the solution configuration for the class library to Release, and then build the class library. When you're done, close the solution.
Modify the Inventory Maintenance app to use the library
6. Open the InventoryMaintenance project in the ExtraStarts\Ch16 InventoryMaintenanceLib directory.
7. Delete the InventoryItem.cs and InventoryDB.cs files, and then add a reference to the InventoryLibrary assembly you created in step 4.
8. Display the code for the Inventory Maintenance form, and add a using directive for the namespace you created in step 3. Do the same for the New Item form.
9. Test the app to be sure it still works.
Bonus
10. Move the Validator class to a class library and update the Inventory Maintenance app to use it.
Assignment 1 6 - 2 Create and use a class library

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!