[corlib] Make Marshal.BufferToBSTR(Array, int) non-public again (#5670)
[mono.git] / mcs / tests / gtest-304.cs
1 //
2 // Second test from bug 80518
3 //
4 using System;
5
6 namespace test
7 {
8     public class BaseClass
9     {
10         public BaseClass()
11         {
12         }
13         public string Hello { get { return "Hello"; } }
14     }
15
16     public abstract class Printer
17     {
18         public abstract void Print<T>(object x) where T: BaseClass;
19     } 
20     
21     public class PrinterImpl: Printer
22     {
23         public override void Print<T>(object x)
24         {
25             Console.WriteLine((x as T).Hello);
26         }
27     }
28
29     public class Starter
30     {
31         public static void Main( string[] args )
32         {
33             BaseClass bc = new BaseClass();
34             Printer p = new PrinterImpl();
35             p.Print<BaseClass>(bc);
36         }       
37     }
38 }