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
Whats new features in Visual Studio 2012?
What happens to the winfx technologies?
Explain dma? : .NET Architecture
Explain cache? : Dot net architecture
What are .net mobile controls features? : Microsoft dot net mobile
HttpHendler and HttpModules
What other than biginteger has been introduced in system.numerics namespace?
What is the difference between .net mobile pages and ordinary .net web page? : Microsoft dot net mobile
Explain different pipelining hazards and how are they eliminated? : Dot net architecture
State and explain about microsoft.net?
What is a virtual memory? : Dot net architecture
Explain about cookie less session state? : .NET Architecture
Explain pipelining? : .NET Architecture
Explain Singleton design pattern in .net
Is .net easier than java?