Author: martin
Date: 2007-10-09 13:09:18 -0400 (Tue, 09 Oct 2007)
New Revision: 87201
Added:
branches/martin/debugger-terrania/test/F.cs
Log:
Trying to get inheritance working.
Added: branches/martin/debugger-terrania/test/F.cs
===================================================================
--- branches/martin/debugger-terrania/test/F.cs 2007-10-09 17:08:42 UTC (rev
87200)
+++ branches/martin/debugger-terrania/test/F.cs 2007-10-09 17:09:18 UTC (rev
87201)
@@ -0,0 +1,41 @@
+using System;
+
+public class Foo<S>
+{
+ public readonly int A;
+ public readonly S Data;
+
+ public Foo (int a, S s)
+ {
+ this.A = a;
+ this.Data = s;
+ }
+
+ public void Hello (S s)
+ {
+ Console.WriteLine (s);
+ }
+}
+
+public class Bar<T,U> : Foo<U>
+{
+ public readonly T New;
+
+ public Bar (int a, T t, U u)
+ : base (a, u)
+ {
+ this.New = t;
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ Foo<long> foo = new Foo<long> (5, 81);
+ foo.Hello (5);
+
+ Bar<float,int> bar = new Bar<float,int> (8, 3.14F, 16384);
+ bar.Hello (32);
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches