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

What is the difference between do and while loop?

534


What are different types of Delegates in C#?

654


Is inheritance possible in c sharp?

714


What is the difference between and xml documentation tag?

620


Which is better python or c#?

545






Why do we use parameters in c#?

588


What is the .net datatype that allows the retrieval of data by a unique key?

538


What is lastindexof c#?

567


Explain the difference between a namespace and assembly name in .net?

581


What exactly is serverless?

495


what is a enumeration in c#

657


What are destructors in C#?

989


What is the difference between integer and double?

555


Is it possible to execute multiple catch block for a single try statement?

679


What is wpf c#?

565