C# Top level statements

In the newest version of C#, you can have top-level statements instead of putting your entry point in a "static void Main" method. This saves you a couple of indents for your application's starting point, which doesn't really belong in a class in the first place.

The compiler magically puts it in a special class and method, but you don't have to worry about that.

View code on GitHub

Comments

Popular posts from this blog

Left Join in Entity Framework

JavaScript Spread Operator

Create Bootable USB from Windows