M
MASNSN
Guest
Hi
This is a letter to the C# team, when you declare a class without accessor in a given assembly it will be
defined as private![1593430.jpg 1593430.jpg](https://www.computerhelp.forum/data/attachments/57/57386-d1ee639a2c4da8760e547da88c97fd27.jpg?hash=0e5jmixNqH)
Here is what you can see in the ildasm
![1593431.jpg 1593431.jpg](https://www.computerhelp.forum/data/attachments/57/57387-98f55520dd4918e074d8990c01a52d37.jpg?hash=mPVVIN1JGO)
A private accessor couldn't be applied to a class however
![1593432.jpg 1593432.jpg](https://www.computerhelp.forum/data/attachments/57/57388-36cdda086277bd618f3faa25b2837e7b.jpg?hash=Ns3aCGJ3vW)
Ok let's assume that could you explain me this confusion in my mind at least, otherwise let's assume that private means internal !!!
The internal also will cause lot of issues please see this article
Is the C# internal keyword a code smell?
What I suggest is to let the non defined class accessor public by default in the next C# versions
Thank you
The complexity resides in the simplicity Follow me at: MCC 2011
Continue reading...
This is a letter to the C# team, when you declare a class without accessor in a given assembly it will be
defined as private
![1593430.jpg 1593430.jpg](https://www.computerhelp.forum/data/attachments/57/57386-d1ee639a2c4da8760e547da88c97fd27.jpg?hash=0e5jmixNqH)
Here is what you can see in the ildasm
![1593431.jpg 1593431.jpg](https://www.computerhelp.forum/data/attachments/57/57387-98f55520dd4918e074d8990c01a52d37.jpg?hash=mPVVIN1JGO)
A private accessor couldn't be applied to a class however
![1593432.jpg 1593432.jpg](https://www.computerhelp.forum/data/attachments/57/57388-36cdda086277bd618f3faa25b2837e7b.jpg?hash=Ns3aCGJ3vW)
Ok let's assume that could you explain me this confusion in my mind at least, otherwise let's assume that private means internal !!!
The internal also will cause lot of issues please see this article
Is the C# internal keyword a code smell?
What I suggest is to let the non defined class accessor public by default in the next C# versions
Thank you
The complexity resides in the simplicity Follow me at: MCC 2011
Continue reading...