Groups | Blog | Home
all groups > dotnet interop > april 2004 >

dotnet interop : Reflection: Determining a Method's Attributes from within the Method


Good Enchiladas
4/13/2004 4:42:51 AM
Is it possible to determine a method's own attributes from within the method
without hardcoding the name of the method as a constant within the method?
Please tell me if it is possible and how it is done.

Thank you,
Kelly

Nick Hall
4/13/2004 12:08:44 PM
Have a look at System.Reflection.MethodBase.GetCurrentMethod(). You can
then use the Attributes property of the returned MethodBase object.

Nick Hall

[quoted text, click to view]

Andreas Håkansson
4/13/2004 5:28:14 PM
Kelly,

This has been given an answer in the csharp newsgroup.

//Andreas


"Good Enchiladas" <goodenchiladas@hotmail.com> skrev i meddelandet
news:fdKec.2062$B%4.445@fe2.columbus.rr.com...
[quoted text, click to view]

AddThis Social Bookmark Button