Exception error message with incorrect line number

时间:2022-02-05 02:56:27

In Release mode the number in front of the exception is NOT the line of code. Instead it's an offset to the native compiled code, which doesn't have any meaning to humans. More about this here:http://odetocode.com/Blogs/scott/archive/2005/01/24/963.aspx

In debug mode the PDB file will automatically map the native code offset to your .cs line in code and the number displayed WILL be the corresponding line in code.

http://*.com/questions/492201/exception-error-message-with-incorrect-line-number