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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s