Merge pull request #4202 from marek-safar/compression
[mono-project.git] / mcs / tests / gtest-046.cs
blob466c04f4908b9cec5245f51bdf3fb53758884e00
1 // Generic delegates.
3 using System;
5 delegate void Test<T> (T t);
7 class Foo<T>
9 public event Test<T> MyEvent;
11 public void Hello (T t)
13 if (MyEvent != null)
14 MyEvent (t);
18 class X
20 static void do_hello (string hello)
22 Console.WriteLine ("Hello: {0}", hello);
25 public static void Main ()
27 Foo<string> foo = new Foo<string> ();
28 foo.MyEvent += new Test<string> (do_hello);
29 foo.Hello ("Boston");