title: exception stack trace
body: <p>regarding th stack trace depth in debug and release mode.
  I have come to the following conclusion (calling exception.ToString()):</p>
  
  <p>at debug mode you get the complete stack trace with line numbers (several frames)
  at release mode instead complete stack trace you get only the throwing method in try block
  (single frame) with line numbers</p>
  
  <ul>
  <li>is that true ?
  -is there any way to get the complete stack tracve on release mode ?</li>
  </ul>
  
  <p>hello,</p>
  
  <p>I want to log exception details
  log should include all stack trace (all methods in the chain)
  log shoud include line numbers of each method in the stack trace.</p>
  
  <p>I have been trying two methods in debug and release mode.
  I did no like the results:</p>
  
  <p>on debug mode both returns the complete stack trace with line numbers :-)
  on release mode  both returned only the details of catch method. one cant really<br>
     know which call in the try block failed</p>
  
  <p>can anyone please explain it ?
  also, is the stack trace information of excepyion lost when referencing the exception 
  from other method called in the catch block</p>
  
  <p>thanks</p>
  
  <p>option1:  <code>exception.ToString-</code></p>
  
  <p>option2:  same results (see below)</p>
  
  <pre><code>        calling static method receving  the exception as parameter 
          System.Diagnostics.StackTrace exceptionStackTrace = 
              new System.Diagnostics.StackTrace(e, true);
          System.Diagnostics.StackFrame [] exceptionStackFrames = 
              exceptionStackTrace.GetFrames();
           foreach (System.Diagnostics.StackFrame stackFrame in exceptionStackFrames)
          {
              message += String.Format("at {0} {1} line {2} column {3} \n",
                  stackFrame.GetFileName() == null ? string.Empty : stackFrame.GetFileName(),
                  stackFrame.GetMethod().ToString(),
                  stackFrame.GetFileLineNumber(),
                  stackFrame.GetFileColumnNumber());  
          }
  </code></pre>