[System.Data] Try to fix random DataViewTest.DefaultColumnNameAddListChangedTest...
[mono-project.git] / mcs / tests / test-anon-94.cs
blob062f335c83791a1dfd3800e045ee029fa367592e
1 // Compiler options: -r:test-anon-94-lib.dll
3 using System;
5 class Program
7 public class BaseClass
9 public int i;
10 public virtual void Print () { Console.WriteLine ("BaseClass.Print"); i = 90; }
11 public virtual void TestOut (out int arg) { arg = 4; }
14 public class Derived : BaseClass
16 public override void Print ()
18 Action a = () => base.Print ();
19 a ();
22 public override void TestOut (out int arg)
24 int p = 9;
25 Action a = () => {
26 base.TestOut (out p);
27 Console.WriteLine (p);
30 a ();
31 arg = p;
35 public class DerivedLibrary : BaseClassLibrary
37 public override void Print (int arg)
39 Action a = () => base.Print (30);
40 a ();
44 public static int Main ()
46 var d = new Derived ();
47 d.Print ();
49 if (d.i != 90)
50 return 1;
52 int arg;
53 d.TestOut (out arg);
54 if (arg != 4)
55 return 2;
57 var d2 = new DerivedLibrary ();
58 d2.Print (0);
60 if (d2.i != 30)
61 return 3;
63 return 0;