Merge pull request #4202 from marek-safar/compression
[mono-project.git] / mcs / tests / gtest-061.cs
blobd034e23c63d97b84050f353245b51435a968305b
1 using System;
3 public delegate B Test<A,B> (A a);
5 public class Foo<T>
7 T t;
9 public Foo (T t)
11 this.t = t;
14 public U Method<U> (Test<T,U> test)
16 return test (t);
20 class X
22 public static void Main ()
24 Test<double,int> test = new Test<double,int> (Math.Sign);
26 Foo<double> foo = new Foo<double> (Math.PI);
27 Console.WriteLine (foo.Method<int> (test));
29 string s = foo.Method<string> (delegate (double d) { return "s" + d; });
30 Console.WriteLine (s);