Say we have a class library project containing 10 classes. Now I want to create a dll which should contatin only 6 classes out of those 10. How we can achieve this?
You could use compiler directives. E.g.
#define ClassA
#if ClassA
class A
{
}
#endif
#undef ClassB
#if ClassB
class B
{
}
#endif
Class A would be included and Class B would not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With