linux-packaging-mono/mcs/tests/test-async-81.cs
Xamarin Public Jenkins f3e3aab35a Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
2016-02-22 11:00:01 -05:00

22 lines
291 B
C#

using System;
using System.Threading.Tasks;
class MainClass
{
public static void Main ()
{
new MainClass ().Foo ().Wait ();
}
private async Task<int> Foo()
{
await Task.Delay(1);
return 42;
}
private async Task Bar()
{
Console.WriteLine($"Something {await Foo()}");
}
}