I have an ASP.NET project that contains many classes.
I am thinking about creating a class library for the class files so that the code can be reused in other applications. There are two options:
1) Create a class library containing all the classes
2) Create a class library for only the classes that contain code that will be shared and then perhaps use interfaces
Is there any true benefits of option 2? Option 1 would be beneficial because all the code would be in one place.
I would recommend option #2.
If the code will be reused by other applications, I wouldn’t add the additional classes in there, as it would clutter up the library. I would put the remaining classes in the App_Code folder of your ASP.NET application that are specific to that application.