using System;
public class ContrainteConstructeur
{
public static void Main()
{
Z objet=new Z();
objet.MéthodeA();
}
}
public class Z
{
public void MéthodeA() where T:X, new()
{
Console.WriteLine("Z.MéthodeA");
T objet=new T();
objet.MéthodeB();
}
}
public class X
{
public void MéthodeB()
{
Console.WriteLine("X.MéthodeB");
}
}