linux-packaging-mono/mcs/tests/test-async-47.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

40 lines
427 B
C#

using System;
class C
{
public static void Main ()
{
new C ().Test ();
}
void Test ()
{
var v = new View ();
v.Click += async (o, e) => {
var b = new Builder ();
b.SetButton (() => {
Console.WriteLine (this);
});
};
v.Run ();
}
}
class View
{
public event EventHandler Click;
public void Run ()
{
Click (null, null);
}
}
class Builder
{
public void SetButton (Action h)
{
h ();
}
}