3 ms·
You no longer need imports, or namespace, class and main method boilerplate to write a basic C# program; there’s now a way to simply write some lines of code in
by jodrellblank 2y ago
You no longer need imports, or namespace, class and main method boilerplate to write a basic C# program; there’s now a way to simply write some lines of code in a file with some implicit imports, and compile/run them like it was more of a scripting language.
https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/top-level-statements https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/to...
(If there’s other syntax changes, I don’t know them, AFAIK it’s the same C# you write)
- SideburnsOfDoom 2y ago> If there’s other syntax changes, I don’t know them The new syntaxes that come to my mind are: * File-scoped namespaces * "global using" * "using static"