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

What is interface inheritance in c#?

514


Can you declare a field readonly?

536


Which constructor is called first in c#?

515


How to put assembly in gac?

541


What is semaphore in c#?

508






What is xaml file in c#?

530


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

544


What is ienumerator c#?

469


Is collection a data structure?

546


Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

500


What is oledb in c#?

501


Which is faster abstract class or interface in c#?

540


What is thread.sleep()?

514


If you define a user defined data type by using the struct keyword, is it a value type or reference type?

514


State the top.NET class that everything is derived from?

516