What are the different access modifier? Explain in detail?

Answer Posted / imatoria

The access modifier on a property applies to both its get
and set accessors, so different modifiers can’t be applied
for same property.
1. Public- Accessible outside the class through object.
2. Private- Accessible inside the class by member
functions.
3. Protected- Just like private but accessible in derived
class also but by member functions.
4. Internal- Visible inside the Assembly. Accessible through
members. Logic is same as global private.
5. Protected Internal- Visible inside the assembly and
outside the assembly through derived classes.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats new features in Visual Studio 2012?

550


What happens to the winfx technologies?

577


Explain dma? : .NET Architecture

540


Explain cache? : Dot net architecture

595


What are .net mobile controls features? : Microsoft dot net mobile

494






HttpHendler and HttpModules

1690


What other than biginteger has been introduced in system.numerics namespace?

530


What is the difference between .net mobile pages and ordinary .net web page? : Microsoft dot net mobile

528


Explain different pipelining hazards and how are they eliminated? : Dot net architecture

497


State and explain about microsoft.net?

528


What is a virtual memory? : Dot net architecture

535


Explain about cookie less session state? : .NET Architecture

555


Explain pipelining? : .NET Architecture

547


Explain Singleton design pattern in .net

576


Is .net easier than java?

523