Na msdn je to takto
interface I
{
}
class C<T> where T : I
{
}
class B
{
}
class CMain
{
public static void Main()
{
Console.WriteLine(new C<B>()); // CS0309
}
}
Ale moj pripad sa trochu lisi lebo:
interface I
{
}
class C<T> where T : I
{
}
class B: I
{
}
class X<T> where T: C<I>
{
}
class Y: X<B>
{
}
class CMain
{
public static void Main()
{
Console.WriteLine(new Y()); // CS0309
}
}