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

What are the options provived by vss to the user? how it will help us while delevoping application?

1866


Explain difference between machine config vs. Web config? : .NET Architecture

627


What is .net viewstate?

593


What is a service class?

640


any one can explain about projectarchitecture and project approach briefly

2158






Explain .net mobile events? : Microsoft dot net mobile

603


Can I create my own metadata attributes?

617


How do I stop a thread?

623


what is tracing? Where it used?

697


Define the mesi? : Dot net architecture

616


What is textbox control of .net mobile? : Microsoft dot net mobile

703


difference between Response.write,server.transfer and also which one is used when ?

1559


How does an appdomain get created?

639


Differences between VS 2005, 2008 and 2010 ?

668


Describe the Managed Execution Process in .NET?

614