A suggestion to the C# team according to the default class accessor in an Assembly

  • Thread starter Thread starter MASNSN
  • Start date Start date
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

Here is what you can see in the ildasm

1593431.jpg

A private accessor couldn't be applied to a class however

1593432.jpg

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...
 
Back
Top