title: Determine if code is called from within the same assembly
body: <p>I would like to lock down classes within my assembly to stop them being called from other classes within the same assembly.  So in other words, no sideways calls within the assembly.</p>
  
  <p>I was going to write some validation in the class calls to make sure they are not called from within the same assembly.  How can I determine this using reflection?</p>
  
  <p>So its the following scenario:</p>
  
  <pre><code>Assembly1
  ----------
  Class 1A
  
  Assembly2
  ----------
  Class 2A
  Class 2B
  </code></pre>
  
  <p>So class 2A cannot call class 2B.  But Class 1A can call Class 2A or Class 2B.</p>