implicit usings
A project setting that makes the SDK add common using directives, such as System and System.Linq, to every file automatically.
In more detail
Turn it on with <ImplicitUsings>enable</ImplicitUsings>; web projects also get the ASP.NET Core hosting namespaces. It is generated as global usings, so each file lists only the usings special to it.
Example
<ImplicitUsings>enable</ImplicitUsings>Related terms
- using directive — A line such as using System.Text; that lets a file refer to types in a namespace by their short names.
- project file — The XML file, such as Hello.csproj, that tells the build which SDK, target framework, packages and settings a project uses.
- namespace — A name prefix that groups related names under one owner, so the same short name from different owners does not collide.
Taught in
- What is .NET? Runtime vs SDK, and LTS vs STS — Modern .NET Core, C# & Enterprise Microservices
- Records, Pattern Matching, and Modern C# — Modern .NET Core, C# & Enterprise Microservices
- Solutions, Projects, and Target Frameworks — Modern .NET Core, C# & Enterprise Microservices