Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions HelloWorldAsyncMultiTask.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;

namespace HelloWorldApp {

class Program
{

public static async Task Main(string[] args)
{
var helloTask = helloAsync();
var worldTask = WorldAsync();

Task.WaitAll(helloTask, worldTask);
Console.WriteLine(helloTask.Result);
Console.WriteLine(worldTask.Result);

}

private static async Task<String> helloAsync()
{
return "Hello";
}

private static async Task<String> WorldAsync()
{
return "World";
}
}
}