What are the different accessibility levels defined in .NET

Q

What are the different accessibility levels defined in .NET ?

✍: Guest

A

Following are the five levels of access modifiers :-
ã Private : Only members of class have access.
ã Protected :-All members in current class and in derived classes can access the variables.
ã Friend (internal in C#) :- Only members in current project have access to the elements.
ã Protected friend (protected internal in C#) :- All members in current project and all members in derived class can access the variables.
ã Public :- All members have access in all classes and projects.

2007-10-23, 7415👍, 0💬