On Sep 12, 3:08 pm, "Mufasa" <j...@nowhere.c omwrote:
Is there anyway to generate a string that contains the name of the
namespace, the object name and then the function/procedure name that is
currently running.
I want to use this for logging information and am getting tired of having to
type/cut-paste the things.
If I can't get it all, can I get at least some of it?
TIA - Jeff.
Here is a C# example:
static void Main(string[] args)
{
System.Diagnost ics.StackFrame sf = new
System.Diagnost ics.StackFrame( true);
string fileName = sf.GetFileName( );
string lineNumber = sf.GetFileLineN umber().ToStrin g();
string methodName = sf.GetMethod(). Name;
string output = string.Format(" File name={0} , Line
number={1} , Method name={2}", fileName, lineNumber, methodName);
Console.WriteLi ne(output);
}