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 can be done with c#?
What are variables in c#?
What is orm in c#?
What is difference between continue and break in c#?
What is difference between ilist and list?
What are annotations in c#?
Is for loop faster than foreach?
What are the properties of string?
What is namespace in oop?
Define c# i/o classes?
Are there constructors in c sharp?
Do extension methods have to be static?
What is data type c#?
What is session management in c#?
Is int reference type c#?