[Mono.Profiler.Log] Fix excessive byte array allocations.
[mono.git] / mcs / tests / gtest-321.cs
1 // Bug #81158
2 using System;
3
4 public class App
5 {
6     private delegate void TGenericDelegate<T>(string param);
7     public static void Main (string[] args)
8     {
9         App app = new App ();
10         app.Run();
11     }
12     
13     public void Run ()
14     {
15             TGenericDelegate<string> del = ADelegate<string>;
16             TestMethod <string> ("a param", ADelegate<string>);
17             TestMethod <string> ("another param", del);
18     }
19     
20     private void TestMethod <T> (string param, TGenericDelegate<T> del)
21     {
22         Console.WriteLine ("TestMethod <T> called with param: {0}. Calling a delegate", param);
23         if (del != null)
24                 del (param);
25     }
26     
27     private void ADelegate <T> (string param)
28     {
29         Console.WriteLine ("ADelegate <T> called with param: {0}", param);
30     }
31 }