I created a class A that has some functions defined as protected.
Now class B inherits A and class C inherits B. Class A has its own default constructor and a protected parameterized constructor.
I want class B to be able to access all protected functions defined in class A, but class C may have access to some functions, but not all functions and class C inherits class B.
How can I restrict access to some functions of class A from class C?
EDIT:
namespace Db { public class A { private A(){} protected A(string con){assign this value} protected DataTable getTable(){return Table;} protected Sqlparameters setParameters(){return parameter;} } } namespace Data { public class B:A { protected B():base("constring"){} protected DataTable output(){return getTable();} protected sqlparameter values(param IDataParameter[] parameter){} } } namespace Bsns { public class C:B { protected C():base(){} protected DataTable show() {return values(setparameter());} } }
EDIT
I think I'm trying to do this, this is multiple inheritance.
Please check.
class A {
Shantanu gupta
source share