3 ms·
They introduced the concept of top-level scripts a little while back - though I don't know whether its just syntactic sugar such that when it compiles down to I
by vunderba 2y ago
They introduced the concept of top-level scripts a little while back - though I don't know whether its just syntactic sugar such that when it compiles down to IL everything just gets wrapped in a main class.
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...
- sedatk 2y agoIt's just syntactic sugar. That said, a static class with static methods is basically a namespace.