Paragraph Name

Discussion in 'ASP .Net' started by Jim Heavey, Dec 3, 2003.

  1. Jim Heavey

    Jim Heavey Guest

    Hello, I was wondering if there is some way I can obtain the name of the
    subroutine that a line of code is executing in via the code.

    Sy for example you wanted to write a message like the following:

    Trace.Write("ProcessStart", "Starting in Subroutine 'MySubroutine'"

    Is there a way for me to programmatically get the name of the subroutine in
    which this line of code is executing such that I do not have to hard code
    the information everytime?

    Thanks in advance for your assistance!!!!!!
     
    Jim Heavey, Dec 3, 2003
    #1
    1. Advertisements

  2. Have you tried using the GetMethod method in
    System.Diagnostics.StackFrame?

    Bruce Johnson
    http://www.ObjectSharp.com/Bruce

    >-----Original Message-----
    >Hello, I was wondering if there is some way I can obtain

    the name of the
    >subroutine that a line of code is executing in via the

    code.
    >
    >Sy for example you wanted to write a message like the

    following:
    >
    >Trace.Write("ProcessStart", "Starting in

    Subroutine 'MySubroutine'"
    >
    >Is there a way for me to programmatically get the name

    of the subroutine in
    >which this line of code is executing such that I do not

    have to hard code
    >the information everytime?
    >
    >Thanks in advance for your assistance!!!!!!
    >.
    >
     
    Bruce Johnson, Dec 4, 2003
    #2
    1. Advertisements

  3. Jim Heavey

    Jim Heavey Guest

    thanks
     
    Jim Heavey, Dec 4, 2003
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    1,160
    Roedy Green
    Jan 2, 2006
  2. ding feng
    Replies:
    2
    Views:
    3,291
    ding feng
    Jun 25, 2003
  3. Bobby Chamness
    Replies:
    2
    Views:
    2,632
    Joe Smith
    Apr 22, 2007
  4. dorayme
    Replies:
    112
    Views:
    3,634
    dorayme
    Mar 30, 2009
  5. Jack-2
    Replies:
    3
    Views:
    625
    Jack-2
    Dec 24, 2003
  6. Java  script  Dude

    IE name="name" & form.name property bug

    Java script Dude, Jun 29, 2004, in forum: Javascript
    Replies:
    5
    Views:
    518
    Java script Dude
    Jun 30, 2004
  7. Yakov
    Replies:
    1
    Views:
    222
    John W. Krahn
    Nov 12, 2006
  8. Pavils Jurjans
    Replies:
    3
    Views:
    423
    Pavils Jurjans
    Mar 18, 2005
Loading...