protected attributes / retrieving

  • Thread starter Thread starter ViperDK \(Daniel K.\)
  • Start date Start date
V

ViperDK \(Daniel K.\)

I want to make my own attributes that should only be used in derived classes
so the base class can get some metadata of fields in derived classes. for
that reason i try to define a new attribute class in my base class and use
it in the derived classes...

so far so good but when i want to retrieve the attributes with
Type.GetCustomAttributes it doesn't work until i make the attribute class
public. Is there another way to access attributes or are protected
attributes just a thing you can apply for fun but never read out?

thx in advance,
ViperDK
 
ViperDK said:
I want to make my own attributes that should only be used in derived
classes so the base class can get some metadata of fields in derived
classes. for that reason i try to define a new attribute class in my base
class and use it in the derived classes...

so far so good but when i want to retrieve the attributes with
Type.GetCustomAttributes it doesn't work until i make the attribute class
public. Is there another way to access attributes or are protected
attributes just a thing you can apply for fun but never read out?

thx in advance,
ViperDK
Please let me know ([email protected]) when you find a way. I have run
in the same problem
Thanks
 
Back
Top