[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

(C#) Custom attributes & type reflection question

Lance Grooms

10/31/2002 5:23:00 PM

I have a custom class attribute that needs to know the
System.Type of the class it is associated with. Right now
I'm passing it in:

[MyClassAttribute( typeof(Foo) )]
public class Foo
{
...
}

It seems like there should be a way for MyClassAttribute
to figure this out on its own via type reflection during
its constructor. Any suggestions? Thanks.