Entire file indented one level for namespace. Wasted space.
// ❌ Old way (extra indentation)
namespace MyApp.Services
{
public class UserService
{
public void DoSomething()
{
// Code here
}
}
}
// ✅ File-scoped namespace (C# 10+)
namespace MyApp.Services;
public class UserService
{
public void DoSomething()
{
// Code here - one less indent level!
}
}
Rule: One namespace per file? Use file-scoped.


