Do you have another answer to this question? Click here

Access Modifiers

Click to Rate this Question 0 Votes
It's basic knowledge, but gives an idea of person's programming skills
 
 

Question Information

 
Posted Date
12 2009
Industries
Occupations
Country
United States
 

Question

Please specify all Access Modifiers and explain proper use or each of them

Answer

The following five accessibility levels can be specified using the access modifiers:

public: Access is not restricted.

protected: Access is limited to the containing class or types derived from the containing class.

Internal: Access is limited to the current assembly.

protected internal: Access is limited to the current assembly or types derived from the containing class.

private: Access is limited to the containing type.

More Info : http://msdn.microsoft.com/en-us/library/wxh6fsc7(VS.80).aspx

 
 
 
1 Answer
 
Actually I stick with public and private. A team has only shown me one good case of internal. My rule of thumb is don't get cute because it will bite you.

12/08/2009
 
 
 
Add Your Answer*
 
Email