title: When does the Dispose Method get called?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7434418/idisposable-question">IDisposable Question</a>  </p>
  </blockquote>
  
  
  
  <p>I have written a class and implemented the <code>IDisposable</code> interface.</p>
  
  <p>I implemetned the <code>Dispose</code> method and put a Code Break in the method.</p>
  
  <p>My assumption is it would have been called when the Class went out of scope due to C# Garabage collection. </p>
  
  <p>I want the dispose method to close an unmanaged resource. I thought it would be more elegant than just calling the method <code>LogOff()</code> instead getting it called whenever the method went out of scope?</p>
  
  <p>But it doesn't seem to get called or stop at the code break.</p>