What are the access-specifiers available in c#?

Answer Posted / ranganathkini

The access-specifiers available in C# are:

1. public - The member can be accessed from anywhere
2. internal - The member can only be accessed from type it
originates from or other types in the same assembly
3. protected - The member can only be accessed from the type
it originates from or from detrieved types of the
originating type
4. protected internal - implies protected OR internal ( not
protected AND internal )
5. private - The member is only accessible by other members
within the type it originates from.

Is This Answer Correct ?    238 Yes 33 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between sqlclient oledb and providers?

487


What are the namespace level elements?

492


Can a class or a struct have multiple constructors?

535


Why singleton pattern is used in c#?

525


What are the 4 pillars of any object oriented programming language?

442






Can we inherit a class with private constructor in c#?

609


Can constructor be private c#?

477


What is code verification?

524


Why singleton class is sealed?

475


How do you pronounce c#?

493


What is the difference between yield and return?

458


What is the solution if you need to manipulate sets of items?

462


What is the difference between continue and break statement?

507


Can we override constructor in c#?

494


What is asynchronous one-way calls?

514