title: Outputting line numbers
body: <p>Is there a way, in VB.NET, to output the current line number in the source code? For example:</p>
  
  <pre><code>Try
      ' The following line will purposly cause an error
      Dim BigNum As Int64
      Dim LittleNum As Int16 = CShort(BigNum)
  Catch ex As Exception
      Dim LineNumber As Integer = &lt;linenumber&gt; ' How do I do this?
      MessageBox.Show("Error in source code. Line: " + LineNumber)
  End Try
  </code></pre>
  
  <p>Is there any way to fill the LineNumber variable in the example above with the actual line number in the source code that caused the error?</p>