Is there a way to get the current line number when executing code? c#
<p>I have a application which writes a log to a .txt file</p>

<pre><code>Helper.WriteSimpleDebugTrace(securityLogFilePath, "About to authenticate user.");
Helper.WriteSimpleDebugTrace(securityLogFilePath, "Directory Search Path:");
Helper.WriteSimpleDebugTrace(securityLogFilePath, "Username:" + username);
</code></pre>

<p>I was just wondering is there a way I could pass the current line number into this method?</p>
