Using System.Diagnostics.Conditional to Exclude Methods from the Library

I make two versions of the library; one for delivery to the customer and one for internal use.

The difference between the two versions is that the internal version will contain methods that the client should not have.

So far, I have used the old # ifdef'ing style to distinguish code, but I would like to go to System.Diagnostics.Conditional.

If I use System.Diagnostics.Conditional to exclude a method, is there a way that the user can discover this method, reconstruct it, or execute it?

Thanks in advance!

+3
source share
1 answer

The method will still be present, but calls are deleted :

ConditionalAttribute , Microsoft (MSIL)

, , , , .

+2

All Articles