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 is strong name in c# and how can we use it?

0 Answers   DELL,


What are strings in c#?

0 Answers  


Why do we need interfaces in c#?

0 Answers  


List some Advantages of switch-case over if else?

0 Answers  


Is vs as c#?

0 Answers  


What?s the difference between the System.Array.CopyTo() and System.Array.Clone()?

3 Answers  


What is out in c#?

0 Answers  


What is string programming language?

0 Answers  


How can you sort strings in array that are passed to method as arguments?

0 Answers  


How do I edit a dll file?

0 Answers  


What framework is used for performance testing/load testing?

0 Answers   TCS,


What are the steps to make an assembly to public?

0 Answers  


Categories