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 - 13 Apr 2004 12:08 GMT
Have a look at System.Reflection.MethodBase.GetCurrentMethod(). You can
then use the Attributes property of the returned MethodBase object.
Nick Hall
> 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
Andreas H?kansson - 13 Apr 2004 16:28 GMT
Kelly,
This has been given an answer in the csharp newsgroup.
//Andreas
> 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