Click here to Skip to main content
15,921,463 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone,


I know that the scope of the private member is with in a class,but when we inherit a class which has both public and private members ,Do the
private members also get inherited...I am asking this since i have read in a website that private members are inherited but they are not accessible..Is it ture?




Regards
Chaithanya M
Posted

1 solution

Do the private members also get inherited
Yes they are inherited, but they are not accesible.

If needed, full details are here: MSDN: Inheritance (C# Programming Guide): Derived Class Access to Base Class Members[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Apr-11 1:21am    
Hard to explain so basic things... a 5.
--SA
Sandeep Mewara 23-Apr-11 1:36am    
Yep! Thanks SA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900