My guess is that providing a line number would assume you've compiled
in debug mode and have the PDB file available.  When you compile in
release mode, some optimizations are done and I don't think you can
clearly map a set of IL code directly to a line in the source file.

And once the method is JIT'd, then you've just got raw machine
language executing.  I really doubt there's a way to map machine
instructions  to a line# in a C#/VB.NET/whatever source file.

On Fri, Aug 1, 2008 at 7:03 AM, Brady Kelly <[EMAIL PROTECTED]> wrote:
> Is there a way to determine the line number that an exception is thrown on
> other than parsing the StackTrace exception property?  Why can't the
> Exception class expose a real StackTrace?

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to