Update mcs/class/System.Core/System/TimeZoneInfo.cs
[mono.git] / mcs / tests / gtest-exmethod-19.cs
1 using System;
2 using System.Collections.Generic;
3
4 public static class Rocks
5 {
6         public static string Test_1 (this string t)
7         {
8                 return t + ":";
9         }
10         
11         public static int Test_2<T> (this IEnumerable<T> e)
12         {
13                 return 33;
14         }
15 }
16
17 public class Test
18 {
19         delegate string D ();
20
21         static int Main ()
22         {
23                 string s = "jaj";
24
25                 D d = s.Test_1;
26                 Func<int> d2 = "33".Test_2;
27                 
28                 if ((string)d.Target != "jaj")
29                         return 10;
30                 
31                 if ((string)d2.Target != "33")
32                         return 11;
33
34                 string res = d ();
35                 Console.WriteLine (res);
36                 if (res != "jaj:")
37                         return 1;
38                         
39                 if (d2 () != 33)
40                         return 2;
41                         
42                 return 0;
43         }
44 }