4
Unless I’m mistaken, the default when no class modifier is defined, for example, is assumed to be the protected:
class LoremIpsum {
...
}
Is there any special reason for this? Which?
4
Unless I’m mistaken, the default when no class modifier is defined, for example, is assumed to be the protected:
class LoremIpsum {
...
}
Is there any special reason for this? Which?
6
The default access modifier for a class is not the protected. Is the internal.
The default access modifier for a class method is the private.
According to answer from Jon Skeet, this is due to the security of the primary language by the greatest possible restriction.
Has more:
public by default;internal by default, but its members are public;internal by default;struct sane private by default;internal by default, their members being always public;Language specification: http://www.microsoft.com/download/details.aspx?id=7029
Browser other questions tagged .net
You are not signed in. Login or sign up in order to post.
Besides
protectednot even be possible inside a namespace... it is only possible to define a typeprotectedas a subtype of another kind.– Miguel Angelo
And I was wrong :) Thank you very much for the agility and quality of your reply. I found a complementary link in the MSDN
– Andre Figueiredo