Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/to...

(If there’s other syntax changes, I don’t know them, AFAIK it’s the same C# you write)



> 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"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: