In fact there is a way to do this, here is a link to the answer to the corresponding SO question.
So, actually your main question is, if there is an opportunity to get a class of a generic member at runtime? Yes, there is - the use of reflection.
When I came up with this answer about a year ago, I tested it and researched a bit. In fact, there were several cases when it did not work as it is (to be an imposition of cases with inheritance), but on the whole it is a mistake to say that this is impossible.
However, I strongly suggest not doing it this way.
EDIT. Surprisingly, I found my own comment below this answer :) And in the next comment there is a link of the author to the original article on the reflection of generics.
source share