Home All Groups Group Topic Archive Search About

dose the attribute know what the class or property is?

Author
19 Nov 2006 9:50 PM
Steven.Xu
hi everybody,
i am using some attribute for a proerty. could the attribute get some class
or property information by itself? i mean, dose the attribute know what the
class or property is? and how?

thanks!

Author
19 Nov 2006 10:58 PM
Mattias Sjögren
>i am using some attribute for a proerty. could the attribute get some class
>or property information by itself? i mean, dose the attribute know what the
>class or property is? and how?

No, an attribute instance doesn't automatically know what it's applied
to.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
19 Nov 2006 11:08 PM
Steven.Xu
i c.
thanks.

Show quote
"Mattias Sjögren" wrote:

> >i am using some attribute for a proerty. could the attribute get some class
> >or property information by itself? i mean, dose the attribute know what the
> >class or property is? and how?
>
> No, an attribute instance doesn't automatically know what it's applied
> to.
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP]  mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
>

AddThis Social Bookmark Button