public class ClassWithGeneric<T>
{
}
public class SecondClassWithGeneric<U>
{
public void getNestedObject()
{
//How do I get the type of object T?
}
}
public class TestProgram
{
var nestedGenerics = new SecondClassWithGeneric<ClassWithGeneric<ObjectToLoad>>;
}
public class ObjectToLoad
{
}
The question is how do I get the type of object T? in this case it would return "ObjectToLoad".