Mike Stall [MS]
11/7/2002 10:53:00 PM
Custom attributes can not be changed (without recompiling). They're embedded
in the meta-data and they're read-only.
If you want it to be changed, then you could make it a field (either static
or instance).
Mike [MS]
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Moses Zhao" <zhao_yao99@hotmail.com> wrote in message
news:uQ2#nbMgCHA.1712@tkmsftngp11...
> Doesn't anybody know how to create an instance of a type by modifying the
> attribute settings on it ?
>
> [myCustomAttribute("moses")]
> public class A
> {
> }
>
> Would want to change "moses" to "zhao" before instantiating an instance of
> class A.
>
> Thanks,
>
> moses
>
>
>