Atribute accessing it's target type

  • Thread starter Thread starter Hugo Batista
  • Start date Start date
H

Hugo Batista

Hi there

Does anybody know how can a custom attribute know in its instance the target
type ? I don't need the target instance neither interact with it.. i just
need to know the target type .

Otherwise, it will be very weird to declare something like

[MyCustomAttribute(typeof(MyType))]
class MyType(){
}

thanks!
HB
 
well...

i have to tell the attribute that it's being used where it's being used :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top