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

Answers were Sorted based on User's Feedback



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

Answer / rathika

It will be inherited but cannot be accessible.

Is This Answer Correct ?    12 Yes 1 No

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

Answer / 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

More C Sharp Interview Questions

What is the compiler of c#?

0 Answers  


what is the difference between a struct and a class in c#?

0 Answers   4Cplus,


Can a static class have a constructor c#?

0 Answers  


Structs are largely redundant in c++. Why does c# have them?

0 Answers  


When static constructor is invoked?

9 Answers   TCS,






What are the different types of assembly?

0 Answers  


In object oriented programming, how would you describe encapsulation in c#?

0 Answers  


Can extension methods access private members?

0 Answers  


What is tuple in c#?

0 Answers  


What are the characteristics of c#?

0 Answers  


Is c# int immutable?

0 Answers  


Give an example of a ctype.

0 Answers  


Categories