C# - Create an Async/Await Main(string[] args)

I apologize in advance. This is more of a codebyte than a How-To guide but I think it's neat.

Updated (6/30/2018)

Main Async has been added in C# 7.1

Example

using System;
using System.Threading.Tasks;

namespace Demonstration
{
    public static class Program
    {
        static async Task Main(string[] args)
        {
            await Console.Out.WriteLineAsync($"I've turned myself asynchronous, Morty!");
        }
    }
}

This code also cooly demonstrates how to use Console with Async/Await.

Old Way

General Rules

Example

using System;
using System.Threading.Tasks;

namespace DirectoryTestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            MainAsync(args).GetAwaiter().GetResult();
        }

        static async Task MainAsync(string[] args)
        {
            await Console.Out.WriteLineAsync("I've turned myself Asynchronous, Morty!");
            await Console.In.ReadLineAsync();
        }
    }
}

This code also cooly demonstrates how to use Console with Async/Await.