C# and .NET interview questions: - What are different access modifiers?

89 0 0
                                        

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.

Also see the following video on Lambda expressions, Action, Func and Predicate in C#:- 

Visit to get more stuff on  interview questions and answers for C# and .NET

Regards,

Visit for more authors’ blog on Most asked C# and .NET interview question 

C# and .NET interview questions: - What are different access modifiers?Where stories live. Discover now