If we inherit a class do the private variables also get
inherited ?

Answer Posted / kishore.a

Private variables are not inherited. Access specifier
Private is mainly mean for the inheritance concept so that
derived classes cannot inherit the private members of base
class..

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain About delegates

802


So what makes your code really object-oriented #?

689


What is .cshtml file?

679


Why abstract class is not instantiated in c#?

711


Why main method is static in c#?

691


What is the difference between string and string in c#?

697


What is returned if you pass the value 12.34 to the parsefloat () function?

712


In c#, what will happen if you do not explicitly provide a constructor for a class?

740


Define delay signing?

715


What is private static in c#?

675


What is the difference between string and stringbuilder in c#?

695


What is threading in c# with example?

659


write code for inserting and updating recoards in sql server database using connected architecture & records shoulds displayed in grid view ( use c# )

2193


What is the Signification of the "new " keyword in C#? example

716


From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

755