In a catch block, how can I get the line number which threw an exception?
catch
It works:
var LineNumber = new StackTrace(ex, True).GetFrame(0).GetFileLineNumber();