Take stars out of types where they make more sense.
[mono-project.git] / mcs / tests / gtest-052.cs
blobf513eeeb03358f4bc6aa7a50716d3bd326c54390
1 // We create an instance of a type parameter which has the new() constraint.
2 using System;
4 public class Foo<T>
5 where T : new ()
7 public T Create ()
9 return new T ();
13 class X
15 public X ()
16 { }
18 void Hello ()
20 Console.WriteLine ("Hello World");
23 public static void Main ()
25 Foo<X> foo = new Foo<X> ();
26 foo.Create ().Hello ();