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
how can we achieve language interoperability through CLS? How MSIL works?
What are the main Tools to develop .Net Application?
what is the difference between running an application with and without debugger?
Which software is used for .net programming?
deference between display and visibility property of CSS
Explain domestic architecture artifacts? : Dot net architecture
What is textview control of .net mobile? : Microsoft dot net mobile
what is the method while we are using adapter and dataset ?
Explain the components required to develop mobile applications with .net mobile? : Microsoft dot net mobile
Explain the purpose of cache? : Dot net architecture
What is the access level of the visibility type internal?
what is sessions and cookies take one example simple way to understand
What are .net mobile controls features? : Microsoft dot net mobile
if there are two application 1 and 2 having a variable x in both app if client1 changes value of x in 1 app client 2 want reads the value of x from 2 app what resultant value will he get
What does the term "green architecture" mean? : .NET Architecture