title: How does the .NET IL .maxstack directive work?
body: <p>I'd like to know how does .maxstack really work. I know it doesn't have to do with the actual size of the types you are declaring but with the number of them. My questions are:</p>
  
  <ol>
  <li>does this apply just for the
  function, or to all the functions
  that we are calling for?</li>
  <li>even if it's just for the function
  were .maxstack is being declared,
  how do you know what maxstack is if
  you have branching? You go and see
  all the "paths" and return the
  maximum value possible?</li>
  <li>What happens if I set it to 16 and
  actually there are 17 variables?</li>
  <li>Is there a too big of a penalty if I
  set it to 256?</li>
  </ol>