Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

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

There are 5 access modifiers. Access modifiers define scope for members.


  • Private: Accessible only with in the class.

  • Protected: - Accessible with 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.

net

This interview question taken from my book Most asked .NET interview questions

See the following video on difference between string and string builder in C# and .NET training: -


Do not forget to see our .NET interview question videos

Regards,

Click to view more from author's on Dotnet interview questions and answers

Tags: .net and c# interview questions, .net and c# training, .net interview questions and answers, access modifier, csharp interview questions, information technology questions, programming interview questions
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments