how to assign an attribute to an inherited field from base class

F

Florian Paulus

Hi group,

i'm wondering how to assign an attribute to a field that a class
inherited from a base class.

Say base class has a field protected string message, so in the derived
class i want to assign an attribute to it, i don't know how.

i don't want to override the base class field, just add an attribute.
and i can't add it in the base class cause the different subclasses use
different attributes for the same field.

a quick answer is greatly appreciated

cheers

Florian
 
B

bruce barker

you can't, the field definition belongs to the base. if it was a property you
could override it, add an attribute and return the base value.

-- bruce (sqlwork.com)
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top