title: How to lock down a distributed DLL?
body: <p>I have a shared .Net DLL that is used by a few applications and a publicly usable API. I plan to distribute the API DLL, but because of the link have to distribute the shared dll also.</p>
  
  <p>What is the best option to prevent uneccessary classes and data from being used?</p>
  
  <p>Declare everything in the shared dll as internal that is not used in the API?</p>
  
  <p>Create a new DLL that contains all the shared items between the API and the other projects?</p>
  
  <p><strong>Edit:</strong> All things have been created in C#. I am also mostly interested in presenting the user with a nice and friendly API. It is my understanding that whatever I do the user could always use reflector to look at it anyways.</p>