List the 5 different access modifiers in c#?



List the 5 different access modifiers in c#?..

Answer / Sulochana Singh

1. `public` - Accessible from anywhere
2. `protected` - Accessible within the class itself and derived classes
3. `internal` - Accessible within the assembly (DLL or EXE) only
4. `private` - Accessible only within the current class
5. `protected internal` - Accessible within the assembly and derived classes

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the difference between virtual method and abstract method?

1 Answers  


Is it possible to force garbage collector to run?

1 Answers  


how to cleanup object that does not support dispose method? How to implement dispose for such scenarios?

2 Answers   ITC Infotech,


Valuetype/reference type?

6 Answers   Microsoft,


What is the difference between dictionary and hashtable in c#?

1 Answers  


What is a class c#?

1 Answers  


Why is c# good for games?

1 Answers  


Is the following code legal?

1 Answers  


How can we convert XML Data to DataBase Table in C#.Net?

2 Answers   Wipro,


What is the difference between abstract class and interface in c#?

1 Answers  


What is difference between encapsulation and abstraction in c#?

1 Answers  


In a site to turn off cookies for one page which method is followed?

1 Answers   Siebel,


Categories