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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top