What is the default accessibility level of a class and the class members?

A class is public and class members are public by default.
 
 
--------------------------------------------------------------------------------
 
  A class is public and class members are private by default.
 
 
--------------------------------------------------------------------------------
 
  A class is private and class members are public by default.
 
 
--------------------------------------------------------------------------------
 
  A class is private and class members are private by default.
 
mathieu_cuprykAsked:
Who is Participating?
 
ozymandiasCommented:
Unless thay have changed the rules recently the default accessibility level of a class is private.

http://msdn2.microsoft.com/en-us/library/ba0a1yw2(VS.80).aspx
0
 
ozymandiasCommented:
A class is private...not sure about those members...probably private too.
0
 
muzzy2003Commented:
A class is internal by default, and its members are private by default.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
ozymandiasCommented:
I take it back...

http://msdn2.microsoft.com/en-us/library/ms173121(VS.80).aspx

Classes are internal and their members are private...however that was not one of the options offered :)
0
 
mathieu_cuprykAuthor Commented:
what is the closest answer.
0
 
muzzy2003Commented:
Sorry, guys, but the article that ozymandias posted clearly says:

"Classes and structs are declared as internal by default"

It is the class's members that are private by default. Not bothered about the points, just don't want you getting the wrong answer.
0
 
ozymandiasCommented:
It's a tricky one.

An internal class is public to classes in the same assembly but private to ones outside that assembly.
Does this means it more public than private or more private than public ?
0
 
muzzy2003Commented:
Well, if it's a question of choosing between the four statements, then they're all false.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.