The era of indentation hell is over. C# 10 introduces File-Scoped Namespaces.
// Old Way
namespace MyCompany.MyApp
{
public class MyClass
{
}
}
// New Way (One less level of indentation!)
namespace MyCompany.MyApp;
public class MyClass
{
}
This seems minor, but combined with Global Usings, it saves 5-10 lines of vertical space per file.
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.