❔ How to make a method returning type T but only taking subclasses of a certain class ?
I'd like to make a function that takes the type T as an "argument" (
T MyMethod<T>()
T MyMethod<T>()
), but the type T must be equal to Type Z or subclass of Type Z, how do I do that ? I'd like it search through defined dictionaries that are all typed as subclasses of Type Z.