how to hide members in a abstract class

J

JollyK

Hello everyone,

I have an abstract class (classA) and in my abstract class I have a few
protected methods. Now I have another abstract class (classB) that inherits
from classA. Now both classA and classB are in the same assembly
(assembly1). Now in another assembly (assembly2) I have a sealed class
(classC) that inherits from classB. My problem is that the protected members
from classA are available in classC. By marking them protected internal
doesn't help either. Is there anything that I can do that would hide the
members of classA in classC ?
 
L

LC

Hi,

I Think you must review your "classifications". You can hide members from A
by writing members with the same name in C and using keyword "new", but it
is a bad design signal.

LC
 

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

Top