Say I have the following class structure:
public class Outer<T>
{
public class Inner<U>
{
}
}
And some code:
var testType = typeof(Outer<string>.Inner<int>);
How can I get the constructed generic type typeof(Outer<string>)
, or the value of the generic typeof(string)
from the testType
variable?
Aucun commentaire:
Enregistrer un commentaire