Taken from my book.NET interview questions http://www.flipkart.com/.
There are 5 access modifiers. Access modifiers define scope for members.
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 ?
No comments:
Post a Comment