Merge pull request #3209 from tritao/master
[mono-project.git] / mcs / tests / test-async-60.cs
blob89733249dd0e134c78cf5158c04cc4c0c9a1a85f
1 using System;
2 using System.Collections.Generic;
3 using System.Threading.Tasks;
5 class C : B
9 class B
13 class X
15 public static void Main ()
17 var x = new X ();
18 x.AlignTwoItems ().Wait ();
21 public async Task AlignTwoItems ()
23 var items = new [] {
24 (C) await AddItemAt (20, 20),
25 (C) await AddItemAt (40, 40)
27 await MoveItemBy (items, 1, 1);
29 Console.WriteLine ((C) items [0]);
30 Console.WriteLine ((C) items [1]);
33 Task MoveItemBy (object o, int a, int b)
35 return Task.FromResult (2);
38 async Task<B> AddItemAt (int a, int b)
40 return new C ();