Click here to Skip to main content
15,922,512 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi all, i want add to my project a class from out side("previous"project) that i create in the past how i can do this i work in c#2008.
Posted

Just copy the file(s) to your new project source folder, and add them to the project in the IDE.
 
Share this answer
 
Right Click on the project you want to add the class and select the option Add existing item,browse to the location of the file and select it.

Please make sure to change the namespace to the current otherwise your class will not be accessible in the current project.
 
Share this answer
 
v2
Another way is if you had the code you wanted in a ClassLibrary, when you compile it it creates a DLL in the bin folder. Copy this DLL to a relevant location to your new project and reference it from within your new project.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900