Compile line # into text with C#?

  • Thread starter Thread starter Dick Bridges
  • Start date Start date
D

Dick Bridges

I want to compile the line number (and module name) into the text when
throwing an exception. I don't want to create a StackFrame. This isn't
debug code. I simply want the module name and line number *COMPILED* into
the message (i.e., __FILE__ and __LINE__).

Please tell me this can be done. Then, if you'd be so kind, point me toward
the docs that describe how! ;)

TIA
 
Dick Bridges said:
I want to compile the line number (and module name) into the text when
throwing an exception. I don't want to create a StackFrame. This isn't
debug code. I simply want the module name and line number *COMPILED* into
the message (i.e., __FILE__ and __LINE__).

Please tell me this can be done. Then, if you'd be so kind, point me
toward
the docs that describe how! ;)

You can't. The compiler does not support anything like this. Its
unfortunate, but...
 
Back
Top