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 the purpose of cache? How is it used? : .NET Architecture
Explain the difference between primary & secondary storage device? : .NET Architecture
Explain pipelining? : Dot net architecture
Can I create my own permission set?
Explain Singleton design pattern in .net
i wish to write mcts(microsoft certified technology specialist) exam. can anyone give the model question or format and preparation method?
How to implement the display in the class printdoc (how to resolve the naming conflict) a: no naming conflicts
Explain 'managed' mean in the .NET context
What is application frame host?
What is Com Callable wrapper?when it will created?
Can I create my own context attributes?
How does an appdomain get created?
What is cache coherency and how is it eliminated? : .NET Architecture
Explain difference between inprocess vs out process session state? : .NET Architecture
difference between data reader and dataset