update readme (#21797)
[mono-project.git] / mcs / tests / test-async-47.cs
blob4b6af22d5fa2f4164caf74cc8aa45a736f565767
1 using System;
3 class C
5 public static void Main ()
7 new C ().Test ();
10 void Test ()
12 var v = new View ();
13 v.Click += async (o, e) => {
14 var b = new Builder ();
15 b.SetButton (() => {
16 Console.WriteLine (this);
17 });
19 v.Run ();
23 class View
25 public event EventHandler Click;
27 public void Run ()
29 Click (null, null);
33 class Builder
35 public void SetButton (Action h)
37 h ();