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

40 lines
624 B
C#

using System;
using System.Collections;
public class X
{
string[] ABC = { "A", "B", "C" };
string [,] EFGH = { { "E", "F" }, { "G", "H"}};
delegate string Foo ();
delegate void Bar (string s);
public string Hello ()
{
Foo foo = delegate {
foreach (string s in ABC){
Bar bar = delegate (string t) {
Console.WriteLine (t);
};
bar (s);
}
foreach (string s in EFGH){
Bar bar = delegate (string t) {
Console.WriteLine (t);
};
bar (s);
}
return "Hello";
};
return foo ();
}
public static void Main ()
{
X x = new X ();
Console.WriteLine (x.Hello ());
}
}