title: how to print out line number during application run in VB.net
body: <p>I would like to print out my debug message with line number in VB.net application.
  I did like this,</p>
  
  <pre><code>Dim st As StackTrace
  Dim sf As StackFramee
  st = New StackTrace(New StackFrame(True))
  sf = st.GetFrame(0)
  Console.WriteLine.("Line " &amp; sf.GetFileLineNumber()）
  </code></pre>
  
  <p>I wanna put the snippet to a class, everytime I call logMsg method to log my message with line number in source code.
  But I found if I put the snippet above into a class, the line number was always same, that's the line which I new 'st'.</p>
  
  <p>The function is exact same with _<em>LINE</em> macro in C++. Actually I am C++ programmer.</p>
  
  <p>Anyway to fix this problem? thanks.</p>