2010-06-03 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / gcs0413.cs
blob8cfae6a8bdbbb076a3276f711a7e355e9987b79d
1 // CS0413: The `as' operator cannot be used with a non-reference type parameter `T'. Consider adding `class' or a reference type constraint
2 // Line: 7
4 public class SomeClass {}
6 public class Foo<T> {
7 public T Do (object o) { return o as T; }
10 class Driver {
11 static void Main ()
13 Foo<SomeClass> f = new Foo<SomeClass> ();
14 f.Do ("something");