Is it possible, and if so, how, to create a generic class, the parameter for which is another universal class?
Pseudo-code explaining the idea:
class Gen<T> where T : class { } // тут всё ОК class MoreGen<G> where G : Gen { } // здесь непонятно как сделать I would like to restrict the parameters for MoreGen only to the Gen<T> classes, so that the following code can be used:
new MoreGen<Gen<AnyClass>>(); // Должно быть OK new MoreGen<string>(); // Нужна ошибка компиляции new MoreGen<Gen<int>>(); // Нужна ошибка компиляции