Sorry to be upset again, but I am doing a project and need your help!

I have a list of a class (eg: List <Medicamentos>...), but this class has 3 subclasses and, how I use properties ,I dont know how to change the attributes of the Superclass and subclass at the same time! To access the Set of the SuperClass I for example: A [j]. Laborat = comboBox1.SelectedText; But I do not know how to do in case of the underclass! Help me please ..

Recommended Answers

All 3 Replies

The answer would normally be you shouldnt.

Please explain a little more of what you're trying to achieve before we can give you better answer

A SUPER-class normally inherits all the methods etc. of his SUB-class.
Say you have a class Car and class Sportscar which inherits from Car. If Car has an engine so will have Sportscar.

I has solved this for myself, but thanks...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.