Thursday, October 11, 2012

.NET Interview questions and answers: -What are different access modifiers?


Taken from my book.NET interview questions http://www.flipkart.com/.
There are 5 access modifiers. Access modifiers define scope for members.

·     Private:  Accessible only with in the class.
·     Protected: - Accessiblewith in the class and in derived classes.
·     Friend (internal in C#):- Accessible anywhere within the current project.
·     Protected friend (protected internal in C#):- Accessible with current project and derived classes.
        ·       Public: - Accessible everywhere.



  

One of interesting .NET interview question: -What is the difference between string and string builder ?










1 comment:

sarabjeet said...

Great work, really appreciate your effort for the information and being enrolled in http://www.wiziq.com/course/46-INTERVIEW-PREPARATION-COURSE-BY-SHIVPRASAD-KOIRALA the OOps, .NET and SQL INTERVIEW Preparation i found your information very helpful.