2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-exmethod-19.cs
blob0a0a1802e9f00436cd5acc63326273e44ef4201c
1 using System;
2 using System.Collections.Generic;
4 public static class Rocks
6 public static string Test_1 (this string t)
8 return t + ":";
11 public static int Test_2<T> (this IEnumerable<T> e)
13 return 33;
17 public class Test
19 delegate string D ();
21 static int Main ()
23 string s = "jaj";
25 D d = s.Test_1;
26 Func<int> d2 = "33".Test_2;
28 if ((string)d.Target != "jaj")
29 return 10;
31 if ((string)d2.Target != "33")
32 return 11;
34 string res = d ();
35 Console.WriteLine (res);
36 if (res != "jaj:")
37 return 1;
39 if (d2 () != 33)
40 return 2;
42 return 0;