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.