2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-321.cs
blobac2df1fa2eb4bbcb9d90680b70f0cbb85edf192d
1 // Bug #81158
2 using System;
4 public class App
6 private delegate void TGenericDelegate<T>(string param);
7 public static void Main (string[] args)
9 App app = new App ();
10 app.Run();
13 public void Run ()
15 TGenericDelegate<string> del = ADelegate<string>;
16 TestMethod <string> ("a param", ADelegate<string>);
17 TestMethod <string> ("another param", del);
20 private void TestMethod <T> (string param, TGenericDelegate<T> del)
22 Console.WriteLine ("TestMethod <T> called with param: {0}. Calling a delegate", param);
23 if (del != null)
24 del (param);
27 private void ADelegate <T> (string param)
29 Console.WriteLine ("ADelegate <T> called with param: {0}", param);