Re: StackTrace and StackFrame
From: Marina (someone_at_nospam.com)
Date: 03/12/04
- Next message: Hyper X: "Re: Annoying little issue... Disconnecting Form level event and Control level event..."
- Previous message: C# beginner: "StackTrace and StackFrame"
- In reply to: C# beginner: "StackTrace and StackFrame"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: StackTrace and StackFrame"
- Reply: anonymous_at_discussions.microsoft.com: "Re: StackTrace and StackFrame"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Mar 2004 14:58:10 -0500
Was the code that is throwing the exception compiled in debug mode? Are the
debug symbols in the same directory?
"C# beginner" <anonymous@discussions.microsoft.com> wrote in message
news:91a001c4086b$0fcbe4c0$a601280a@phx.gbl...
> StackTrace Trace = new StackTrace(true);
> int Count = Trace.FrameCount;
> StackFrame Frame = Trace.GetFrame(0);
> String FileName = Frame.GetFileName();
> int LineNumber = Frame.GetFileLineNumber();
>
> Hi all
> I posted this question a few days back. I am trying the
> above code in my C# assembly. I get Count as 4. But no
> matter how I try, I can't get the correct filename and
> linenumber. They are always null and 0 respectively. Can
> anyone help me resolve this issue?
> I am using a debug build of my assembly.
> Thanks a lot in advance for your replies.
- Next message: Hyper X: "Re: Annoying little issue... Disconnecting Form level event and Control level event..."
- Previous message: C# beginner: "StackTrace and StackFrame"
- In reply to: C# beginner: "StackTrace and StackFrame"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: StackTrace and StackFrame"
- Reply: anonymous_at_discussions.microsoft.com: "Re: StackTrace and StackFrame"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|