If we inherit a class do the private variables also get
inherited ?
Answer Posted / ashwini chavan
yes they are inherited, but cannot be accessible.because
when we inherite the class then all data member and function
member of the base class are accesed in the derive class
attomaticaly.but private specifier is accesible only it's
own class out side class can't acces that private member
when we try it then we got error
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Can non-default constructors be used with single call sao?
What does void do in c#?
What is Fragmentation and its Types?
What are the 2 kinds of data type conversions in c#?
Explain the difference between const and static read-only?
Does c# support multilevel inheritance?
How do I format a string in c#?
Is c# and c same?
What does void mean in c#?
What is static noise?
What is ienumerable and iqueryable?
What is different about switch statements in c#?
Name any three ways to pass parameters to a method in c#?
Can hashset contain duplicates c#?
If a child class instance is created, which class constructor is called first - base class or child class?