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

Is object an int c#?

0 Answers  


How to open a new form on button click in Windows forms?

0 Answers   Viscus Infotech,


Is int a class in c#?

0 Answers  


What are console applications used for?

0 Answers  


What is difference between ienumerable and list?

0 Answers  






What is the solution if you need to manipulate sets of items?

0 Answers  


What is a console application in c#?

0 Answers  


What are anonymous methods ? why these methods are used and in what condition these methods are useful ?

1 Answers  


What is the difference between C# 3.5 and C# 4.0?

0 Answers  


What is the use of partial methods?

0 Answers  


What is the use of "default" and "Using" keyword?

3 Answers   TCS,


What does return do in for loop?

0 Answers  


Categories