2010-04-19 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / delegate8.cs
blobfa004c59d50da6b11066b235f2f2b2422b177c65
1 using System;
2 using System.Threading;
4 // Regression test for bug #59299
6 public class Test
8 delegate void M(ref object x, ref object y);
10 public static void Foo(ref object x, ref object y)
12 x = 20;
13 y = 30;
16 public static int Main()
18 IAsyncResult ar;
19 M m = new M(Foo);
20 object x1 = 10, x2 = 10;
22 ar = m.BeginInvoke(ref x1, ref x2, null, null);
24 m.EndInvoke(ref x1, ref x2, ar);
26 if ((int)x1 != 20 || (int)x2 != 30)
27 return 1;
29 return 0;