Home All Groups Group Topic Archive Search About

A question about reflection and custom attribute

Author
3 Aug 2006 7:53 AM
OGG
Hi guys,

Do you think it's possible to add a custom attribute to a method at
runtime ?
if yes, how ? I can't find a way to  implement it.

Thanks.

Author
12 Aug 2006 11:17 PM
Michael
I don't believe it is possible unless you recompile you class on the fly
through reflection and use MethodBuilder.SetCustomAttribute to add your
attribute.

HTH,
Michael
http://www.seeknsnatch.com

Show quote
"OGG" <itye.rich***@gmail.com> wrote in message
news:1154591632.889648.38810@75g2000cwc.googlegroups.com...
> Hi guys,
>
> Do you think it's possible to add a custom attribute to a method at
> runtime ?
> if yes, how ? I can't find a way to  implement it.
>
> Thanks.
>

AddThis Social Bookmark Button