What are the different access modifier? Explain in detail?

Answers were Sorted based on User's Feedback



What are the different access modifier? Explain in detail?..

Answer / 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

What are the different access modifier? Explain in detail?..

Answer / pushparaj pentakota(anakapalli

public == accessble from any where,no restriction.
private == aceessble only from within the class only.
protected == accessble from same class and child class also
but not from non-child class.it may be within
project or out side of the project also.
internal == accessble only from same class and child class
and non-child class also but within the project
only.
protected internal == accessble from any where except
non-child class of out side of the
project.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

What is the cli? Is it the same as the clr?

0 Answers  


What is .net mobile automatic paging? : Microsoft dot net mobile

0 Answers  


what does dot in .net means

1 Answers  


Use of Enable view state ? if turn off what happen ?

1 Answers  


What is the use of TPL DATAFLOW?

0 Answers   MCN Solutions,






What size is a .net object?

0 Answers  


What is the use of web.config?

0 Answers  


Describe the Managed Execution Process in .NET?

0 Answers   InfoAxon Technologies,


Explain the purpose of cache? : Dot net architecture

0 Answers  


Define pipelining? : Dot net architecture

0 Answers  


How Web service create Proxy Using WSDL?

1 Answers  


Explain difference between inprocess vs out process session state? : .NET Architecture

0 Answers  


Categories