What are the access-specifiers available in c#?
Answer Posted / soundararajan rajendran
Public
Protected
Internal(Known as "Friend" in C++)
Private
Protected or Internal
Public:
Any one can access the member functions and variables.
Protected:
Only child classes or classes that derive from this can
access.
Internal:
Classes within the same assembly can access but not by
child classes.
Private:
Accessible within the same class only.
Protected or Internal:
Member functions and variables can be accessed from the
classes which are in the same assembly Or can be accessed
from the the child classes.
| Is This Answer Correct ? | 19 Yes | 7 No |
Post New Answer View All Answers
What is the purpose of ienumerable in c#?
What Is An Interface Class?
What is difference between class and interface in c#?
What's the difference between an integer and int?
What is threading in c# with example?
Explain static class members.
What are extender provider components? Explain how to use an extender provider in the project.
What do you mean by hashtable c#?
Why do we write system in c#?
What is the use of iqueryable in c#?
How can I create a process that is running a supplied native executable (e.g., Cmd.exe)?
What happens during the process of boxing?
What is getenumerator?
What is namespace in oop?
What is the resgen.exe tool used for?