C
C# beginner
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.
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.