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

Answer Posted / javed khan

No, We cant inherit private member of base class. We got
error like " member is inaccessible due to its protection
level."

Is This Answer Correct ?    7 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between add and addrange in c#?

491


What do you mean by generic class in c#?

489


Write a sample code to write the contents to text file in c#?

475


How is the syntax written to inherit from a class in C#?Give an example ?

532


Explain the difference between abstract class and interface in .net?

466






Is arraylist thread safe?

486


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

16604


What are the return types in c#?

484


What is the difference between ref and out in c#?

461


If dll and exe files are same it means you can deploy both the files in gac?

491


How do you declare a method in c#?

488


What is the use of regex in c#?

489


What is default boolean value in c#?

478


Why hashtable is thread safe in c#?

484


what is difference between destruct or and garbage collection ?

508