C# Feature β File-scoped namespaces
Overview
Section titled βOverviewβUse a semicolon after namespace to scope the entire file, avoiding an extra block and indentation.
Introduced In
Section titled βIntroduced InβC# 10 (2021)
namespace MyApp{ class C {}}namespace MyApp;class C {}Gotchas & Best Practices
Section titled βGotchas & Best Practicesβ- One file-scoped namespace per file.