In Visual Stuido 2013, working in C# (.Net 4.5), how can I pass a line number to a method call. I recall in C there was a #pragma lineNumber to do this, but searching on those terms brings up nothing.
I want to write a method something like this:
// unchecked code:
private void printResetStopwatch(int lineNumber)
{
stopwatch.stop();
System.Console.WriteLine(stopwatch.Elapsed.ToString() + " at line " + lineNumber.ToString();
}
and I would call it something like
printResetStopwatch(#pragma lineNumber);
if #pragma was the answer.