2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git] / mono / tests / generic-marshalbyref.2.cs
blobc9db8d046c4c96ed20262b8dd4e92c09618c8a06
1 using System;
3 static class Program
5 static int Main()
7 DocumentForm<object> browseForm = new DocumentForm<object> ();
8 if (browseForm.DoInit () != 248)
9 return 1;
10 return 0;
14 public abstract class EntityBase
18 public class GenEntity<T> : EntityBase
22 class DocumentForm<T>
24 internal int DoInit()
26 var g = new Grid1<GenEntity<T>>(123);
27 var g2 = new Grid2<GenEntity<T>>(123);
28 return g.num + g2.num;
32 public class Grid1<TEntity> : MarshalByRefObject
34 public int num;
36 public Grid1 (int i)
38 num = i + 1;
42 public class Grid2<TEntity> : MarshalByRefObject where TEntity : EntityBase, new()
44 public int num;
46 public Grid2 (int i)
48 num = i + 1;