I have used typeof(T) inside the generic class, so fx a function inside the classPie where T can be refered.
But out of context, if you were to call typeof(T) inside Program.cs’s main function, it would not work.
Yeah, but to do that you’d need an instantiated instance of the Pie class, which would answer in the context of the generic type parameter, not the whole Pie class.
This is too funny. Everyone here, me included, is profoundly overthinking this, lol.
I have used typeof(T) inside the generic class, so fx a function inside the
class Pie
where T can be refered. But out of context, if you were to call typeof(T) inside Program.cs’s main function, it would not work.Yeah, but to do that you’d need an instantiated instance of the Pie class, which would answer in the context of the generic type parameter, not the whole Pie class.
This is too funny. Everyone here, me included, is profoundly overthinking this, lol.