blob: 6876a98b25a5435e854a15bc39c3b4e98e63c83c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// CS0311: The type `object' cannot be used as type parameter `U' in the generic type or method `G<C>.Method<U>()'. There is no implicit reference conversion from `object' to `C'
// Line: 9
public class C
{
public static void Main ()
{
var mc = new G<C> ();
mc.Method<object> ();
}
}
public class G<T> where T : C
{
public void Method<U> () where U : T
{
}
}
|