Explain the access modifiers in c#?



Explain the access modifiers in c#?..

Answer / Amit Kumar Batar

C# has four access modifiers: private, protected, internal, and public. Private is only accessible within the class it is declared; Protected can be accessed within its own class or derived classes; Internal can be accessed within the same assembly (DLL or EXE); Public is accessible from any code that uses the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is a delegate?

5 Answers   Siebel Systems,


What is stringwriter c#?

1 Answers  


How big is an int in c#?

1 Answers  


write a c# program add two matrix with input number ?

1 Answers   Wipro,


what are the different ways to cleaning up objects?

2 Answers   Wipro,


What is the difference between private and protected in c#?

1 Answers  


What is asynccallback c#?

1 Answers  


What is the execution entry point for a c# console application?

1 Answers  


What happens if the inherited interfaces have conflicting method names?

1 Answers  


What is the name of the implicit input parameter of a set accessor for any property?

1 Answers   TCS,


Is system a class in c#?

1 Answers  


What is use of console?

1 Answers  


Categories