1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// CS0304: Cannot create an instance of the variable type `T' because it does not have the new() constraint // Line: 8 public class Foo<T> { public T Create () { return new T (); } } class X { static void Main () { } }