Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-lambda-21.cs
1 using System;
2
3 class Program
4 {
5         static void Foo (Action<string> a)
6         {
7                 a ("action");
8         }
9
10         static T Foo<T> (Func<string, T> f)
11         {
12                 return f ("function");
13         }
14
15         static string Bar ()
16         {
17                 return Foo (str => str.ToLower ());
18         }
19
20         public static int Main ()
21         {
22                 var str = Foo (s => s);
23                 Console.WriteLine (str);
24                 if (str != "function")
25                         return 1;
26                 Foo (s => Console.WriteLine (s));
27                 return 0;
28         }
29 }