2007-03-09 Chris Toshok <toshok@ximian.com>
[mcs.git] / errors / gcs0413-2.cs
blobf33f290eedc154d6f34403aabb15df6682768c2a
1 // gcs0413-2.cs: The as operator requires that the `T' type parameter be constrained by a class
2 // Line: 8
4 public class SomeClass {
7 public class Foo<T> where T : struct {
8 public T Do (object o) { return o as T; }
11 class Driver {
12 static void Main ()
14 Foo<SomeClass> f = new Foo<SomeClass> ();
15 f.Do ("something");