Hello.
I have a generic class in C#, like this:
public class GenericClass<T> { ... }
Now, I have the Type
object for an object, and would like to, through reflection or otherwise, to get the Type
object for GenericClass<T>
where T corresponds to that Type object I have my object.
Like this:
Type requiredT = myobject.GetType();
Type wantedType = typeof(GenericClass<requiredT>);
Obviously this syntax doesn't work, but how do I do it?