Drew,

Thanks for the snippet. I was looking for something generic (for stock error
logging code), so I could paste it in, but haven't had any luck so far. If
it comes down it, I guess I could get the stack from the exception and walk
back up it to find the name of my method that caused the error, but that
doesn't sound appealling to me.

Thanks,
Erick

----- Original Message -----
From: "Marsh, Drew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 2:46 PM
Subject: Re: [DOTNET] Method call in parameter?


> Erick Thompson [mailto:[EMAIL PROTECTED]] wrote:
>
> > How do I get the name of class I'm currently executing in if
> > I'm in a static method?
>
> <codeSnippet language="C#">
> typeof(YourClass).Name
> </codeSnippet>
>
> HTH,
> Drew
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to