mathieu_cupryk
asked on
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.
--------------------------
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.
A class is private...not sure about those members...probably private too.
A class is internal by default, and its members are private by default.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 :)
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 :)
ASKER
what is the closest answer.
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.
"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.
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 ?
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 ?
Well, if it's a question of choosing between the four statements, then they're all false.