Are private class-level variables inherited?

Answers were Sorted based on User's Feedback



Are private class-level variables inherited?..

Answer / venu gopal

Yes, but they are not accessible, so looking at it you can
honestly say that they are not inherited. But they are.

Is This Answer Correct ?    18 Yes 0 No

Are private class-level variables inherited?..

Answer / suresh.gv

Yes Private Variables are inherited to the Derived Class.

But we can't access them on Derived Class

Is This Answer Correct ?    9 Yes 1 No

Are private class-level variables inherited?..

Answer / duc nguyen

according to "http://www.velocityreviews.com/forums/t130343-question-about-inheritance-of-private-variables.html"

"According to the Java Language Specification, the definition of "inherited"
is such that the data member is available by subclasses. Using this
definition, private members are not inherited, HOWEVER, they are 'there',
that is, instances of the subclass contains the data that is held by the
private member - it is just not exposed by the superclass"

Is This Answer Correct ?    3 Yes 0 No

Are private class-level variables inherited?..

Answer / kiran

private and protected members are inherited

Is This Answer Correct ?    4 Yes 2 No

Are private class-level variables inherited?..

Answer / kirti

Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

what are wrapper classes?

1 Answers  


Can arraylist hold primitive types?

0 Answers  


how to add datarow to datatable

1 Answers  


What is inheritance c#?

0 Answers  


What is shared inheritance

3 Answers   IGT,






How to transpose multi-dimensional array?

0 Answers   C DAC, CDAC,


How does bitwise xor work?

0 Answers  


What is string pool in c#?

0 Answers  


What is dll in vb.net?

0 Answers  


What is different between Boxing and Unboxing?

0 Answers  


Why do we use anonymous method in c#?

0 Answers  


why C++ Partial Object Oriented Programming Language and C# and Java Fully Object Oriented Language

11 Answers   3i Infotech, Alexa, Assyst, Naresh i Technologies, TCS,


Categories