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
Explain about microsoft visual studio?
Explain about clr?
What is a managed code is dim fs as filestreamobject is a managed code? : .NET Architecture
how to change the application name?
What's new in the .net 2.0 class library?
what is the difference between running an application with and without debugger?
Difference between throw exception and rethrowing ?
What is boxing and unboxing? Does it occure automaatically or you need to write code to box and unbox?
What is gui programming? : .NET Architecture
Explain .net mobile selectionlist control? : Microsoft dot net mobile
What is Video Streaming in .net??
Explain hard disk and what is its purpose? : .NET Architecture
Explain How to improve the cache performance? : Dot net architecture
what is sessions and cookies take one example simple way to understand
What is the cli? Is it the same as the clr?