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 difference between ilist and list?
What are scriptable objects?
How many types of constructors are there?
Explain “static” keyword in c#?
What exactly is serverless?
What is regex c#?
Is c# still popular?
What is action c#?
How to add controls dynamically to the form using c#.net.
What is the use of delegates in c#?
Define constructor in c#.
What is args c#?
What is data dictionary in c#?
Name some properties of thread class.
How do I edit a dll file?