2010-06-03 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-lambda-13.cs
blob817a698daef9e0ac8f30794f9f59a3241bc037e4
1 using System;
3 class TestUnary
5 static void Foo (Action<int> a)
9 static void Bar ()
11 Foo (str => ++str);
15 class Program
18 static void Foo (Action<string> a)
20 a ("action");
23 static T Foo<T> (Func<string, T> f)
25 return f ("function");
28 static string Bar ()
30 return Foo (str => str.ToLower ());
33 static void Main ()
35 var str = Foo (s => s);
36 Console.WriteLine (str);
37 Foo (s => Console.WriteLine (s));