**** Merged from MCS ****
[mono-project.git] / mcs / errors / gcs0310-2.cs
blob62e4f3198878d8425be663353bb20857f292b56d
1 // CS0310: The type 'A' must have a public parameterless constructor in
2 // order to use it as parameter 'T' in the generic type or method 'Foo<T>'
3 // Line: 20
5 public class Foo<T>
6 where T : new ()
10 class A
12 private A ()
13 { }
16 class X
18 static void Main ()
20 object o = new Foo<A> ();