using System;
public class Test{
public static void Main(){
Z obj=new Z();
obj.MethodA();
}
}
public class Z {
public void MethodA() where T:X, new() {
Console.WriteLine("Z.MethodA");
T obj=new T();
obj.MethodB();
}
}
public class X{
public void MethodB() {
Console.WriteLine("X.MethodB");
}
}