To get things started, let’s make a clear distinction between .net 6.0 and C# 10. Though they come out bundled simultaneously, their versioning is distinct.

Where are my using statements?

With version 10 of C#, we also get Implicit Usings. In the simplest of terms, this means that you no longer have to spend time thinking about which namespaces to include in your application, you can start coding and the namespaces will implicatively be included.

Tell me more

When you create a new console application you’ll notice the following line in the csproj file:

<ImplicitUsings>enable</ImplicitUsings>

This property builds on the existing global usings directive. It’ll also allow you to kickstart code a lot quicker. For example, the below code

using System;  
using System.Collections.Generic;  

var a = "World";  
Console.WriteLine($"Hello, {a}!");  
List<string> listA = new();

will be simplified as

var a = "World";  
Console.WriteLine($"Hello, {a}!");  
List<string> listA = new();

This might not seem like much in such a small context but in cases where you want to build something more intricate but fairly common it removes the need for a lot of boilerplate and saves time and effort.

This seems like quite a magical feature to many and I’ve already heard grumblings from people about it but I’m willing to give it a shot. I think a lot of new features like this might at first appear like it’s taking control away from the developer, like garbage collectors (as Scott Hanselmann pointed out) when they initially became a thing. Still, developers starting off now only with C# will most likely find it very intuitive.

The feature was most likely deliberated over by people much more intelligent than I am and who am I to argue with them? Happy to see cool, visible, updates to language I really enjoy using.