An important aspect in building maintainable software is the concept of encapsulation. Encapsulation allows us to build modular solutions where internal details (and complexity) are hided behind well-defined interfaces.
Visual Studio helps us with this by creating a new class internal
by default:
Unfortunately, I noticed that most developers immediately change the access modifier to public
or even change the default in their IDE(to create public
classes by default).
If everything is public, there is no encapsulation.
Therefore we should definitely change the approach to private by default. In .NET we are rather limited in our options to provide module encapsulation and can only really achieve it at the assembly level (through the internal
access modifier).
More information: Access Modifiers - C# Programming Guide | Microsoft Learn