I'm relatively new to C#, so not sure of all the ins/outs of the exception object. When exceptions occur, I'd *like* to see the detail of when/where it occurred. (Something similar to Java's very detailed PrintStackTrace.)
So, these are exceptions being thrown *within* my code, nothing coming up from the library or other third-party code... truth is, I've been bad in writing clean code, so sometimes I get null reference exceptions. Bottom line, these are in the same function that I have the try/catch in.
I've been using the stackframe, and calling GetLineNumber() to try to do that in C#. But not seeing the line number.. it always comes across as zero. Any suggestions?
Comment