One options (poor mans option):
Private Sub MethodA()
Dim m As String = "MethodA"
T.TraceEvent(TraceEventType.Start, 0, m)
Some code...
T.TraceEvent(TraceEventType.Stop, 0, m)
End Sub
This at least sets the value the same and allows some code generation across
all methods for the m value. It gets expensive to set up a monitor to
determine which method you are in, esp. if you are hitting it numerous times,
so I would be wary about that direction. You could set m at runtime using
that form of method, but typing the line once for each method, or autogenning
for methods, is a much more practical approach.
Hope this helps!

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> In the example below where the TraceEvent method is being called how
> can I get the Methods name ("MethodA") I am passing as the message
[quoted text clipped - 10 lines]
> T.TraceEvent(TraceEventType.Stop, 0, "MethodA")
> End Sub
Jay Pondy - 09 Mar 2006 20:12 GMT
Thanks Greg.
I was beginning to think I had the plague or something.
Another method I've found is to pop it off the stack which includes
the Class.MethodName which is what I am really after.
I write a lot of industrial code which needs to be 24x7 and tracing
can really be a life saver because all kinds of crazy things happen to
network connections, partial file transfers etc. etc.
If you see this can you tell me if I am showing up as an MSDN Managed
Newsgroup member?
>One options (poor mans option):
>
[quoted text clipped - 14 lines]
>
>Hope this helps!
Use System.Reflection.MethodInfo.GetCurrentMethod.Name
>In the example below where the TraceEvent method is being called how
>can I get the Methods name ("MethodA") I am passing as the message
[quoted text clipped - 10 lines]
> T.TraceEvent(TraceEventType.Stop, 0, "MethodA")
>End Sub