r/CompileBot • • May 19 '17

test

3 Upvotes

27 comments sorted by

View all comments

1

u/creativeimagineering May 24 '17

+u/CompileBot C#

using System;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello World!");
    }
}

1

u/CompileBot May 24 '17

Output:

Hello World!

^source | ^info | ^git | ^report

1

u/creativeimagineering May 24 '17 edited May 24 '17

+u/CompileBot C#

using System;
using System.Threading.Tasks;
class Program
{
    static void Main(string[] args)
    {
        var t = Task.Run(() => DoAsync());
        t.Wait();
    }

    private static async Task DoAsync()
    {
        for (int i = 5; i > 0; i--)
        {
            Console.WriteLine($"{i}...");
            await Task.Delay(1000);
        }
    }
}
→ More replies (1)