file-scoped namespace
A namespace declaration ending in a semicolon, such as namespace Catalog.Pricing;, that applies to the whole file without braces.
In more detail
It saves a level of indentation in every file and is the default style in new templates. A file can have only one.
Example
namespace Catalog.Pricing;Related terms
- namespace — A name prefix that groups related names under one owner, so the same short name from different owners does not collide.
Taught in
- Records, Pattern Matching, and Modern C# — Modern .NET Core, C# & Enterprise Microservices