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
}
}
TIP: Přetáhni ikonu na hlavní panel pro připnutí webu

Stálý člen

Nahlásit jako SPAM
IP: 85.159.104.–
Hero
Zjistit počet nových příspěvků
































